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

delayLicenseRequestUntilPlayed configuration breaks offline storage of protected assets #2218

Closed
pilipicus opened this issue Oct 28, 2019 · 3 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@pilipicus
Copy link

Hi there,

I have developed a Shakaplayer player prototype to use “delay license request”. However, I get an error "Cannot read property 'paused' of null at Xc.p.Fe " even using the manifest file and licence taken from your Shalkaplayer demo page (https://shaka-player-demo.appspot.com/demo/#audiolang=en-GB;textlang=en-GB;uilang=en-GB;panel=HOME;build=uncompiled).

https://test-dds-pwa-bucket.s3-eu-west-1.amazonaws.com/player/index.html.

Please let me know. Thank you in advance

@pilipicus pilipicus added the type: question A question from the community label Oct 28, 2019
@theodab
Copy link
Contributor

theodab commented Oct 28, 2019

It looks like the delayLicenseRequestUntilPlayed parameter causes storage of protected assets to fail. We should probably just be ignoring that parameter when storing for offline anyway, it doesn't make much sense in that case.
Thanks for bringing this to our attention!

@theodab theodab added type: bug Something isn't working correctly and removed type: question A question from the community labels Oct 28, 2019
@shaka-bot shaka-bot added this to the v2.6 milestone Oct 28, 2019
@theodab theodab changed the title Shakaplayer delayLicenseRequestUntilPlayed configuration breaks offline storage of protected assets Oct 28, 2019
@pilipicus
Copy link
Author

pilipicus commented Oct 28, 2019

I would like to allow the user to download only the manifest file and saved it locally. The license, downloaded separetely, would be valid only for a specific amount of time. Once it is expired the user would have to just download a new license without having to download the manifest file again.
In the best scenario, it would be possible to set up the validity of the license also for a specific range in the future.
The idea Is to allow the user to watch a video content offline but only for a specific range of time.
Is there any way to reach it even partially with Shakaplayer?

@TheModMaker
Copy link
Contributor

You can set the offline.usePersistentLicense configuration to false when storing to ignore the persistent license. Then when you load the asset, we'll require a network connection for the license request, but the content will be loaded offline.

If you store the license offline, then there is no way to renew it. See #1347 for a feature request to allow this, but it is on the backlog and the PR hasn't been updated recently.

We have no control over how long the license is good for. Your license proxy sets the license duration settings. You can control for how long a user can watch the content, but that is done with the license proxy. You should contact Widevine (or PlayReady, or another DRM provider) for more info on that.

TheModMaker pushed a commit that referenced this issue Nov 6, 2019
When storing assets offline with the storage system, the DRM
engine is used if the asset is protected. However, we never attach
the DRM engine, which means it never gets an associated video.
When the delayLicenseRequestUntilPlayed config value is set, the
DRM engine checks the paused status of the video; thus, if there is no
video element, the DRM engine errors and the download fails.
It would be fairly simple to make the DRM engine attach the video, but
honestly, the delayLicenseRequestUntilPlayed parameter doesn't make
sense for offline storage anyway. So this just changes the DRM engine
to ignore delayLicenseRequestUntilPlayed if it has no video.

Fixes #2218

Change-Id: If4e8d24fdcd1eca81cc39b845e5a833a3f1ce5e6
@shaka-project shaka-project locked and limited conversation to collaborators Dec 28, 2019
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants