-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Play using ClearKey #780
Comments
This part is not correct. The JSON string you've contructed there is an online license key response, not an offline keyset ID (which you would have got from e.g.
Your Why do you create two separate Similarly, it seems your Why do you need You may find the code looks a bit simpler if you use |
May I get a simple Player.addmediaitem example with clearkey and clearkeyiD please (,just this part) It's a bit confusing |
Something like this, untested, and in Java rather than Kotlin String clearkeyJsonResponse = "TODO";
DrmSessionManager clearkeyDrmSessionManager =
new DefaultDrmSessionManager.Builder()
.setUuidAndExoMediaDrmProvider(C.CLEARKEY_UUID, FrameworkMediaDrm.DEFAULT_PROVIDER)
.build(
new LocalMediaDrmCallback(clearkeyJsonResponse.getBytes(StandardCharsets.UTF_8)));
ExoPlayer player =
new ExoPlayer.Builder(/* context= */ this)
.setMediaSourceFactory(
new DefaultMediaSourceFactory(/* context= */ this)
.setDrmSessionManagerProvider(mediaItem -> clearkeyDrmSessionManager))
.build();
String mpdUrl = "TODO";
player.addMediaItem(
new MediaItem.Builder()
.setUri(mpdUrl)
.setDrmConfiguration(new MediaItem.DrmConfiguration.Builder(C.CLEARKEY_UUID).build())
.build()); |
I can't access your MPD linked above (403 error), but you may want to check that your ClearKey |
Ok I'll get back to you:) thanks for such quick replies |
I have checked this and it existsit exists like ContentProtection enic:default_KID: value |
I'm going to close this because without access to the media there's no further assistance we can really offer (we're just guessing at potential causes at this point, which isn't a great use of time). |
Failed to make drm plugin: 4
|
This manifest includes a license server URL as documented here: https://github.com/Dash-Industry-Forum/ClearKey-Content-Protection#workflow This means it shouldn't need a
I logged the JSON license request that would have been sent:
It seems in your hard-coded JSON response you've mixed up the
Fixing this and using
Closing as I believe this resolves the question. |
I was able to play that public source using this but the one i started this question intially withis still unplayable with error:
https://bpprod6linear.akamaized.net/bpk-tv/irdeto_com_Channel_464/output/manifest.mpd { |
plays this |
Try check back your code of hex to base64 conversion. Or try manually using this site. |
Hello,
I have a dash (mpd) DRM protected Video which Works well on JW test Stream site, But I was unable to get it working With ExoPlayer
All i get is A blank screen with time seeker at 4hours++ random time
FULL CODE: https://gist.github.com/AmarnathCJD/e575991991f0a2b6201398cc24221f7b
drmKey = "b8ed4930014a0ad8f4bc2310f378edd2"
drmKeyId = "89413479ba07590893320faf05a6b7fd"
mpdUrl = "https://bpprod3linear.akamaized.net/bpk-tv/irdeto_com_Channel_301/output/manifest.mpd"
header = ["host": "bpprod3linear.akamaized.net"]
No License server.
My Questions:
Current Error:
Playback error androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:668) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: android.media.MediaCodec$CryptoException: Decryption Error: ERROR_DRM_NO_LICENSE
Failed on decrypt, error description:Status(-8, EX_SERVICE_SPECIFIC): '1: {"cdmError":1,"errorMessage":"Decryption Error"}
PS: sorry for such silly question, This was all i could makeup after hours of google search for documentation, its hard as most codes are of exoplayer2 and backwards compatablity of this lib is not that great:)
The text was updated successfully, but these errors were encountered: