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

Add Player.retryLicensing() #1772

Open
rkuroiwa opened this issue Jan 18, 2019 · 2 comments
Open

Add Player.retryLicensing() #1772

rkuroiwa opened this issue Jan 18, 2019 · 2 comments
Labels
flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this priority: P2 Smaller impact or easy workaround type: enhancement New feature or request
Milestone

Comments

@rkuroiwa
Copy link

Have you read the FAQ and checked for duplicate open issues?
Yes.

Is your feature request related to a problem? Please describe.

This is a follow up on #1771
If shaka player signaled the app that there are no keys available, then the app can decide to take an action.

Describe the solution you'd like

Player.retryRequest() will restart from creating a new MediaKeySession, from the same MediaKeys instance that is attached to the media element, and generates a request (MediaKeySession.generateRequest()).
For "persistent-license" sessions, use MediaKeySession.load() instead.

Basically it restarts from loading a license into the CDM.

Describe alternatives you've considered

If it is going to be a configuration rather than an notification to the app, this doesn't need to be exposed, but the functionality is still required.

Additional context

This may be also useful for other cases. For example, if the user decides to put their computer to sleep for the duration of the license, and when they wake up the computer, all the keys are "expired". The app may decide to call Player.retryRequest() to "renew" the license.

@theodab theodab added type: enhancement New feature or request and removed needs triage labels Jan 18, 2019
@shaka-bot shaka-bot added this to the Backlog milestone Jan 18, 2019
@joeyparrish
Copy link
Member

I would suggest a different name: player.retryLicensing(). Retrying a "request" is very generic, and the name could apply to all kinds of network requests. Since we want something that parallels player.retryStreaming(), but for DRM licenses, I think retryLicensing() is the better name.

I'll rename the issue to reflect that.

@joeyparrish joeyparrish changed the title Add Player.retryRequest() Jan 18, 2019
@joeyparrish joeyparrish added the flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this label Jan 18, 2019
@joeyparrish joeyparrish modified the milestones: Backlog, Backlog 2 Jan 28, 2020
@joeyparrish joeyparrish added the priority: P2 Smaller impact or easy workaround label Sep 29, 2021
@cristian-atehortua
Copy link
Contributor

This looks like a nice feature. On our side, we are facing an issue on Tizen devices when the user leaves the app with the player opened. When he comes back after some minutes, we ran into an error because the player tries to resume playback but as the license expired and it was not renewed since the app was in the background, Shaka just crash.

Even better, is it possible Shaka automatically tries to renew the license when it was not able to renew because the app is in the background?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this priority: P2 Smaller impact or easy workaround type: enhancement New feature or request
5 participants