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

[Proposal] DRM: Add keySystems[].reuseMediaKeys loadVideo option #1520

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

peaBerberian
Copy link
Collaborator

@peaBerberian peaBerberian commented Aug 28, 2024

We've seen multiple occurences lately on several devices where playback failed after playing a few encrypted contents.

On those, setting the closesSessionsOnStop option (an option and already-existing work-around) had no effect, yet renewing the MediaKeys at each load fixed the issue.

It's very probably device bugs. For those, we usually had the strategy of knowing on which devices this problem was encountered, detect it inside the RxPlayer, and choose to always renew the MediaKeys on those (without the application even knowing we did that).

However, some users suggested to us to add this as an option, because they may have reproduced the issue on other devices.

I'm kind of ambivalent toward adding this as an option:

  • I generally prefer our strategy of fixing it for all devices with the issue, with people reporting issues to us when a new device has the issue. This allows to fix it once and for all for all those devices.

  • I understand that some applications might prefer to iterate rapidly and be able to have more control over the RxPlayer behavior.

Another PR, #1510, would allow doing this by patching our config instead but this would not be doable in production for applications (config properties are not something we guarantee in our API).

This PR however, would allow applications to do it when and wherever they please.

Thoughts?

@peaBerberian peaBerberian added DRM Relative to DRM (EncryptedMediaExtensions) proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it Priority: 3 (Low) This issue or PR has a low priority. labels Sep 3, 2024
We've seen multiple occurences lately on several devices where playback
failed after playing a few encrypted contents.

On those, setting the `closesSessionsOnStop` option (an option and
already-existing work-around) had no effect, yet renewing the MediaKeys
at each load fixed the issue.

It's very probably a device bug. For those, we usually had the strategy
of knowing on which devices this problem was encountered, detect it
inside the RxPlayer, and choose to always renew the `MediaKeys` on those
(without the application even knowing we did that).

However, some users suggested to us to add this as an option, because
they may have reproduced the issue on other devices.

I'm kind of ambivalent toward adding this as an option:

  - I generally prefer our strategy of fixing it for all devices with the
    issue, with people reporting issues to us when a new device has the
    issue. This allows to fix it once and for all for all those devices.

  - I understand that some applications might prefer to iterate rapidly
    and be able to have more control over the RxPlayer behavior.

Another PR, #1510, would allow doing this by patching our config instead
but this would not be doable in production for applications (config
properties are not something we guarantee in our API).

This PR however, would allow applications to do it when and wherever they
please.

Thoughts?
@peaBerberian peaBerberian changed the title [Proposal] DRM: Add keySystems[].renewMediaKeys loadVideo option [Proposal] DRM: Add keySystems[].reuseMediaKeys loadVideo option Sep 6, 2024
@peaBerberian peaBerberian added Priority: 1 (High) This issue or PR has a high priority. and removed Priority: 3 (Low) This issue or PR has a low priority. labels Sep 6, 2024
Comment on lines +265 to +267
We noticed that reusing a previous `MediaKeys` had led to errors on a few devices. For
example some smart TVs had shown errors after playing several encrypted contents, errors
which disappeared if we renewed the `MediaKeys` for each content.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if those details are relevant in the documentation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't it?

To me it explain why this option exists and why it may be useful no?

example some smart TVs had shown errors after playing several encrypted contents, errors
which disappeared if we renewed the `MediaKeys` for each content.

We should already be able to detect most of those cases in the RxPlayer logic. However, it
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to write good technical doc, but I think one improvement would be to not use pronoms like "we"
=> The RxPlayer should be able to detect most of those cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated for renewMediaKeys only, we may want to update the wording for other option in a commit external to that PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRM Relative to DRM (EncryptedMediaExtensions) Priority: 1 (High) This issue or PR has a high priority. proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants