Skip to content
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

[BUG]: DRM Video not Playing on Android #4119

Closed
ShaimaaSabry opened this issue Aug 29, 2024 · 4 comments
Closed

[BUG]: DRM Video not Playing on Android #4119

ShaimaaSabry opened this issue Aug 29, 2024 · 4 comments
Labels
bug Missing info Some information from template are missing Missing repro Issue reproduction is missing Platform: Android

Comments

@ShaimaaSabry
Copy link

Version

6.4.5

What platforms are you having the problem on?

Android

System Version

Pixel 8

On what device are you experiencing the issue?

Simulator

Architecture

Old architecture

What happened?

I added the player to my code. Playing a plain mp4 file works fine. Playing a Dash DRM file displays a black screen, the player starts progressing for a second then it crashes and starts from the beginning and freezes. I tested the Dash video on an online player and it works fine.

My code:
<Video source={{ uri: "https://dvfjyetbqjf38.cloudfront.net/test-output-1/BigBuckBunny.mpd", }} drm={{ type: 'widevine', licenseServer:'https://drm-widevine-licensing.axprod.net/AcquireLicense', headers: { 'X-AxDRM-Messaige':'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJiZWdpbl9kYXRlIjoiMjAwMC0wMS0wMVQxMzo0NjoyMiswMzowMCIsImV4cGlyYXRpb25fZGF0ZSI6IjIwMjUtMTItMzFUMjM6NTk6NDArMDM6MDAiLCJjb21fa2V5X2lkIjoiZTljODZjMzctZmJkMi00NjhjLWIxNjMtYjFkODAwZWU2NDFlIiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsInZlcnNpb24iOjIsImxpY2Vuc2UiOnsiZHVyYXRpb24iOjM2MDB9LCJjb250ZW50X2tleXNfc291cmNlIjp7ImlubGluZSI6W3siaWQiOiI0YTg3ZDgxMy0wYTYxLTRkODktOWQ5OS0wOWUwYmEzN2ExYTIifV19fX0.BC_roJdYijF2-GGQh6wra5R_ap6lKgdoHnDzlxdtjJc', 'Content-Type': 'application/octet-stream' } }} style={styles.video} />

Reproduction Link

repository link

Reproduction

Step to reproduce this bug are:

Copy link

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction
  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

@github-actions github-actions bot added Platform: Android Missing info Some information from template are missing Missing repro Issue reproduction is missing labels Aug 29, 2024
@freeboub
Copy link
Collaborator

your DRM server report an error 400:

08-29 14:14:08.623 18391 18391 E RNVExoplayer: playerFailed [eventTime=7.48, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED
08-29 14:14:08.623 18391 18391 E RNVExoplayer: androidx.media3.exoplayer.ExoPlaybackException: Source error
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:717)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:671)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at android.os.Handler.dispatchMessage(Handler.java:102)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at android.os.Looper.loop(Looper.java:223)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at android.os.HandlerThread.run(HandlerThread.java:67)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: Caused by: androidx.media3.exoplayer.drm.DrmSession$DrmSessionException: androidx.media3.exoplayer.drm.MediaDrmCallbackException: androidx.media3.datasource.HttpDataSource$InvalidResponseCodeException: Response code: 400
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at androidx.media3.exoplayer.drm.DefaultDrmSession.onError(DefaultDrmSession.java:569)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at androidx.media3.exoplayer.drm.DefaultDrmSession.onKeysError(DefaultDrmSession.java:556)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at androidx.media3.exoplayer.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:515)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at androidx.media3.exoplayer.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:61)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at androidx.media3.exoplayer.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:631)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: at android.os.Handler.dispatchMessage(Handler.java:106)
08-29 14:14:08.623 18391 18391 E RNVExoplayer: ... 2 more

please use charles proxy to understand the issue and reproduce with postman

@ShaimaaSabry
Copy link
Author

@freeboub Thank you. Can you please explain to me how did you get this error message so that I follow in your steps and debug this issue?

@freeboub
Copy link
Collaborator

freeboub commented Aug 31, 2024

It is the extract of "adb logcat" in a shell.
Regarding how to debug, you should review this page in detail : https://thewidlarzgroup.github.io/react-native-video/other/debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Missing info Some information from template are missing Missing repro Issue reproduction is missing Platform: Android
Projects
None yet
Development

No branches or pull requests

2 participants