kaltura / playkit-android Goto Github PK
View Code? Open in Web Editor NEWPlayKit: Kaltura Mobile Player SDK for Android
Home Page: https://developer.kaltura.com/player/android
License: GNU Affero General Public License v3.0
PlayKit: Kaltura Mobile Player SDK for Android
Home Page: https://developer.kaltura.com/player/android
License: GNU Affero General Public License v3.0
Please provide documentation to integrate this with react-native.
i am seeing the following exception on Android 9
any insights about this issue or how we can avoid it for now
thanks
Fatal Exception: com.google.gson.JsonParseException: Adaptor failed to parse result, com.kaltura.playkit.providers.api.ovp.model.KalturaStartWidgetSessionResponse at com.kaltura.playkit.providers.api.ovp.model.OvpResultAdapter.deserialize + 64(OvpResultAdapter.java:64) at com.kaltura.playkit.providers.api.ovp.model.OvpResultAdapter.deserialize + 39(OvpResultAdapter.java:39) at com.google.gson.internal.bind.TreeTypeAdapter.read + 69(TreeTypeAdapter.java:69) at com.google.gson.Gson.fromJson + 927(Gson.java:927) at com.google.gson.Gson.fromJson + 994(Gson.java:994) at com.google.gson.Gson.fromJson + 967(Gson.java:967) at com.kaltura.netkit.utils.GsonParser.parse + 26(GsonParser.java:26) at com.kaltura.netkit.utils.GsonParser.parseArray + 37(GsonParser.java:37) at com.kaltura.playkit.providers.api.ovp.KalturaOvpParser.parse + 56(KalturaOvpParser.java:56) at com.kaltura.playkit.providers.api.ovp.KalturaOvpParser.parse + 48(KalturaOvpParser.java:48) at com.kaltura.playkit.providers.ovp.KalturaOvpMediaProvider$Loader.onEntryInfoMultiResponse + 292(KalturaOvpMediaProvider.java:292) at com.kaltura.playkit.providers.ovp.KalturaOvpMediaProvider$Loader.access$700 + 183(KalturaOvpMediaProvider.java:183) at com.kaltura.playkit.providers.ovp.KalturaOvpMediaProvider$Loader$1.onComplete + 245(KalturaOvpMediaProvider.java:245) at com.kaltura.playkit.providers.ovp.KalturaOvpMediaProvider$Loader$1.onComplete + 238(KalturaOvpMediaProvider.java:238) at com.kaltura.netkit.connect.request.RequestBuilder$1.onComplete + 151(RequestBuilder.java:151) at com.kaltura.netkit.connect.executor.APIOkRequestsExecutor$2.onResponse + 191(APIOkRequestsExecutor.java:191) at com.google.firebase.perf.network.zzg.onResponse + 22(zzg.java:22) at okhttp3.RealCall$AsyncCall.execute + 206(RealCall.java:206) at okhttp3.internal.NamedRunnable.run + 32(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker + 1167(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run + 641(ThreadPoolExecutor.java:641) at java.lang.Thread.run + 764(Thread.java:764)
PlayKitManager.loadPlayer
is calling MediaSupport.checkWidevineModular
which triggers the same native code.According to our Crashlytics, there multiple ANRs happening when trying to load the player on different devices. Most often it's OnePlus 8/8T/8Pro (Android 11) , Samsung S20 FE (Android 12), Moto g9 (Android 11)
PlayKitManager.loadPlayer
initializes the player
An ANR occurs when trying to initialize the player
#00 pc 0x9b2b4 libc.so
#01 pc 0x57de0 libc.so
#02 pc 0x87dbc libhidlbase.so
#03 pc 0x8326c libhidlbase.so
#04 pc 0x7c7d0 libhidlbase.so
#05 pc 0x7d83c libhidlbase.so
#06 pc 0x4b590 libhidlbase.so
#07 pc 0x4e320 libhidlbase.so
#08 pc 0x3b61c [email protected]
#09 pc 0x22730 libmediadrm.so
#10 pc 0x2256c libmediadrm.so
#11 pc 0x671cc libhidlbase.so
#12 pc 0x83288 libhidlbase.so
#13 pc 0x7699c libhidlbase.so
#14 pc 0x772f8 libhidlbase.so
#15 pc 0x21648 libmediadrm.so
#16 pc 0x154f4 libmediadrm.so
#17 pc 0x15674 libmediadrm.so
#18 pc 0x21478 libmediadrm.so
#19 pc 0x51a48 libmedia_jni.so
at android.media.MediaDrm.isCryptoSchemeSupportedNative(MediaDrm.java)
at android.media.MediaDrm.isCryptoSchemeSupported(MediaDrm.java:174)
at com.kaltura.playkit.player.MediaSupport$WidevineModularUtil.checkWidevineModular(MediaSupport.java:285)
at com.kaltura.playkit.player.MediaSupport$WidevineModularUtil.access$000(MediaSupport.java:274)
at com.kaltura.playkit.player.MediaSupport.checkWidevineModular(MediaSupport.java:121)
at com.kaltura.playkit.player.MediaSupport.initializeDrm(MediaSupport.java:96)
at com.kaltura.playkit.PlayKitManager.loadPlayer(PlayKitManager.java:58)
at com.kaltura.playkit.PlayKitManager.loadPlayer(PlayKitManager.java:71)
Usually when playing video without ads i do something like that
kalturaPlayer.prepare(config)
and set listners on player to know when its ready and can play
kalturaPlayer.addListener(this, PlayerEvent.Type.CAN_PLAY) {
// content loaded can play now
kalturaPlayer.play()
}
kalturaPlayer.addListener(this, PlayerEvent.Type.ERROR) {
// show error message
}
but after i integrated IMAPlugin non of these listener called!
i only get two events
PlayerEvent.Type.STATE_CHANGED with state LOADING
and
AdEvent.Type.AD_REQUESTED
how do you handle this scenario?
jcenter is shutting down and playkit-android is currently hosted there. It will become read-only on March 31st, 2021 and will be terminated on February 1st, 2022. Please consider switching from jcenter to Maven Central.
I am using KalturaOvpMediaProvider Api to get mediaEntry,
this entry has 3 closed captions added from KMC console. i can see them from console and web embedded player V3 and V2
However when i am querying player on android for available tracks i find textTracks size is 0
I am using playkit and playkitproviders Version :3.9.6
and tried running it on android version 7,8 and 9
Notes:
DRM in enabled for this entry and i notice that the media source type is DASH
Thanks
is there a way to to disable or remove plugins after calling PlayKitManager.loadPlayer
i have a list of videos but i don't want all the plugins to be enabled in all videos
instead of creating new player with its plugins for each video, i want to create player once is that possible?
The SDK should expose the function which is already given by SimpleExoPlayerView.
i.e simpleExoPlayerView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FILL);
There are for modes :
Resize mode fill
Resize mode fit
Resize mode zoom
Resize mode Fixed
In Device with 18:9 aspect ratio the screen fills with video and remove the size black bars.
I know about listener PlayerEvent.volumeChanged. It is doesn't solve my problem.
Thank you friends!
Hi Team,
I have integrate Kaltura Playkit and trying casting video to google chromecast.
If i fix the URL video streaming it will working fine, but i generate link streaming from SDK it can not cast the video to chrome cast.I have follow with your sample but still not resolve it.
Pls support me. Thanks!
is there a way to implement the bumper behavior like this one
http://player.kaltura.com/docs/index.php?path=kbumper
thanks
Hi, would it be possible to upgrade your library's PlayServices dependency to 11.6.2?
Thanks!
Just a quick question.
My colleague installed a playkit 3.3.5 which he says works for him. Once I cloned our repository and tried to build, Gradle couldn't find that version, and both 3.3.3 and 3.3.6 don't playback the video (that's possibly another issue but irrelevant in this issue).
I've checked the releases and there is no trace of a 3.3.5. My theory is that it existed at some point and got cached in his Gradle cache.
So, was there ever a v3.3.5?
The SDK is very useful, with flutter's dart becoming widespread, i wonder if you guys have a plan on producing a package/plugin, that supports flutter.
Playkit player version: 4.15.0
Media manifest has multiple audio tracks.
boolean allowMixedCodecs = true;
List<PKAudioCodec> audioCodecPriorityList = new ArrayList<>(Arrays.asList(PKAudioCodec.E_AC3, PKAudioCodec.AC3, PKAudioCodec.AAC));
PlaykitPlayer.getSettings().setPreferredAudioCodecSettings(new AudioCodecSettings(audioCodecPriorityList, allowMixedCodecs));
Setting preferred audio codec with audioCodecPriorityList and allowMixedCodecs as true.
Get all the audio tracks.
Getting only one audio track.
Audio tracks are filtered based on group index. If non adaptive audio tracks are in the same adaptive audio track group, it has been ignored.
for (int i = 0; i < audioTracks.size(); i++) {
audioTrack = audioTracks.get(i);
parsedUniqueId = parseUniqueId(audioTrack.getUniqueId());
if (parsedUniqueId[TRACK_INDEX] == TRACK_ADAPTIVE) {
filteredAudioTracks.add(audioTrack);
currentGroup = parsedUniqueId[GROUP_INDEX];
} else if (parsedUniqueId[GROUP_INDEX] != currentGroup) {
filteredAudioTracks.add(audioTrack);
currentGroup = -1;
}
}
AudioCodecSettings preferredAudioCodecSettings = playerSettings.getPreferredAudioCodecSettings();
if (preferredAudioCodecSettings.getAllowMixedCodecs()) {
return filteredAudioTracks;
}
Hello
i was wondering if there is a way to support preview video while seeking as in the web player version
thanks
Hi,
Could you please add a support for com.google.android.exoplayer2.ui.PlayerView.setControllerVisibilityListener
so that we can listen to controls visibility?
Thank you
com.kaltura.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/mp4v-es, null, -1, null, [720, 1280, 14.999536], [-1, -1]), format_supported=YES
Video have above error. But when play same video in gallery player its working fine. This error occure sumsang android 11 A515F. But not occure in google pixel 5 and below 11 samsung versions.
Can you make exoplayer accessible through the wrapper?
I have integrated IMAConfig to my Kaltura player implementation, but when playing offline content while the internet is not connected, the player keeps loading the Ad and never stops.
The player also didn't fire any of those events:
AdEvent.Type.AD_LOAD_TIMEOUT_TIMER_STARTED and AdEvent.Type.ERROR
Is there any way, even in feature, to make the player fire those events or any other events to indicate Ad load timeout?
Console o/p:
java.lang.RuntimeException: Android dependency 'com.google.android.gms:play-services-basement' has different version for the compile (11.0.2) and runtime (16.0.1) classpath. You should manually set the same version via DependencyResolution
Hello there, i was trying to integrate kaltura analytics following this documentation
https://vpaas.kaltura.com/documentation/Mobile-Video-Player-SDKs/v3_Android_Analytics.html#kaltura-analytics-plugin
however i couldn't find KalturaAnalyticsPlugin anywhere, if found another plugin https://github.com/kaltura/playkit-android-kava
is that the correct plugin to use?
thanks
Paste test code here
localAssetsManager.registerAsset(mediaSource, absolutePath, itemId,
object : LocalAssetsManager.AssetRegistrationListener {
override fun onFailed(localAssetPath: String?, error: java.lang.Exception?) {
Timber.e("Failed to register asset $localAssetPath")
Timber.e(error)
}
override fun onRegistered(localAssetPath: String?) {
Timber.d("asset $localAssetPath registered successfully")
}
})
I'm expecting the downloaded media source to be registered, and onRegistered to be called (The media source has DRM Data)
An exception raises and onFailed is called instead
com.inmobly.impresa.demo E/DownloadToGoDownloader$registerAsset: Failed to register asset /storage/emulated/0/Android/data/com.inmobly.impresa.demo/files/dtg/clear/items/1_jjrdnbe6/data/master.m3u8
com.inmobly.impresa.demo E/DownloadToGoDownloader$registerAsset: com.kaltura.playkit.LocalAssetsManager$RegisterException: Can't parse local dash
at com.kaltura.playkit.drm.WidevineModularAdapter.parseDash(WidevineModularAdapter.java:317)
at com.kaltura.playkit.drm.WidevineModularAdapter.registerAsset(WidevineModularAdapter.java:83)
at com.kaltura.playkit.drm.WidevineModularAdapter.registerAsset(WidevineModularAdapter.java:67)
at com.kaltura.playkit.LocalAssetsManager.lambda$registerDrmAsset$1$LocalAssetsManager(LocalAssetsManager.java:187)
at com.kaltura.playkit.-$$Lambda$LocalAssetsManager$UXre8Mser0kKEryZyd5OpSEhKVQ.run(Unknown Source:12)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.kaltura.android.exoplayer2.ParserException: org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT #EXTM3U
#EXT-X-S...@4:1 in java.io.InputStreamReader@9ee2be7)
at com.kaltura.android.exoplayer2.source.dash.manifest.DashManifestParser.parse(DashManifestParser.java:96)
at com.kaltura.playkit.drm.SimpleDashParser.parse(SimpleDashParser.java:66)
at com.kaltura.playkit.drm.WidevineModularAdapter.parseDash(WidevineModularAdapter.java:309)
... 8 more
Caused by: org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT #EXTM3U
#EXT-X-S...@4:1 in java.io.InputStreamReader@9ee2be7)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:440)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:321)
at com.kaltura.android.exoplayer2.source.dash.manifest.DashManifestParser.parse(DashManifestParser.java:89)
... 10 more
Hi Team,
How to change the logo Kaltura after integrate with chrome cast?
Pls support me or give me the document to integrate player with chrome cast.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.