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

A black screen (idle frame) appearing for 1/2 seconds before a DRM Video. #4495

Open
4 tasks done
smriti0302 opened this issue May 30, 2024 · 3 comments
Open
4 tasks done
Labels

Comments

@smriti0302
Copy link

smriti0302 commented May 30, 2024

Environment

I am using DashJS to play a playlist(list of videos). When the video plays, or it transitions from one video to the next video, the following issues happen :

  1. A black screen appears for 1/2 seconds before the video starts playing.
  2. Sometimes, the video does not start playing from the 0th second, and starts from a random second.
  3. Sometimes, the video plays the video till the 1st second, goes back to 0, and starts playing again, giving a double play effect in the beginning.

I wish for neither of this to happen. My requirement is to play videos seamlessly with no lag, no black screen, no audio glitches, and always start from the beginning of the video. This requirement is being satisfied for when the video is not a DRM Video, but if it is a DRM Video, the above stated issues pop up. I request your assistance in fixing the same.

Code :

https://docs.google.com/document/d/1saOBon2wJYAsJgliA5VR_Cbx4flHTKj5tZLg4HPMLMU/edit?usp=sharing

@smriti0302 smriti0302 added the Bug label May 30, 2024
@dsilhavy
Copy link
Collaborator

I won't be able to check 20 pages of code on Google Docs. Please provide a minified example of how you initialize dash.js and switch between the different MPDs.

Also note that the preload() function does not support playback of DRM protected content. In order to initialize the EME and fetch a license, we need a video element to call setMediaKeys(). The video element is typically not available when using preload(). Instead, it is provided via attachView() after media segments have been preloaded into a virtual buffer.

The default way to switch to a new MPD is to use attachSource(mpd).

@smriti0302
Copy link
Author

smriti0302 commented May 31, 2024

@dsilhavy Sorry about that! Have cleared out the code to include just the relevant parts. You can find it in the same doc. I shall also attach an image that explains the workflow.
I was not aware that preload does not work on DRM videos.
My use case requires videos to play back to back with no loading time (provided a good network connection)
When the video is not a DRM video, the seamlessness is very evident. However, when it is a DRM video, there's a small black screen that comes at the start, before the video plays. I wish for it to play as seamless as a Non DRM video. I want to know if there's something player specific that I'm doing wrong or if this is a typical behaviour seen in DRM videos played using dashjs. Any settings or modifications i can include would be ideal.

@dsilhavy
Copy link
Collaborator

dsilhavy commented Jun 2, 2024

Unfortunately, there is no preload for DRM content which is why you will see a short black screen once the player is loading a new MPD. In case of multiple videos being played one after each other, I suggest creating a single multiperiod MPD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants