Skip to content

Conversation

@peaBerberian
Copy link
Collaborator

@peaBerberian peaBerberian commented Aug 7, 2024

We noticed a pretty big issue on firefox 129 (released yesterday) on windows where we cannot play encrypted contents anymore (seen on production with multiple applications relying on the RxPlayer - so it's a relatively big issue).

It seems that since this release, the
navigator.requestMediaKeySystemAccess EME API, which we use to poll available decryption capabilities in the current environment, will fail as soon as there's at least one asked "robustness" (allows for example to ask for hardware-based DRM) isn't supported even if we're also asking for e.g. software-based DRM, which we know the device has.

It seems likely this is a firefox issue, but it seems too big for us to just do nothing and throw the bug at them.

Other streaming actors, such as Netflix and Amazon Prime Video don't seem to be impacted by the issue at first glance.
In fact, they are, but they have a fallback call where they are calling the navigator.requestMediaKeySystemAccess API without any robustness just in case the API is broken like here.

Yet, we also have the same work-around, but we integrated both configurations (the first with robustnesses, the second without), in the same navigator.requestMediaKeySystemAccess call, whereas they're doing two calls each with an array of a single element (the first with, the second without like us).

So to """""fix""""" the issue, I decided to align with their work-arounds (so the next time it breaks, browser devs will see it also breaks Netflix and thus maybe detect the issue faster).

For the same key system type, doing one call with multiple configurations or multiple calls with one configuration seems equivalent from my understanding of the EME recommendation, so what I did here should change nothing EME-wise (except more EME API calls), it is just to align the code with others.

I still had to change our recently-added code about codec checking, to make it work robustly in that new scenario.

@peaBerberian peaBerberian added bug This is an RxPlayer issue (unexpected result when comparing to the API) Priority: 0 (Very high) This issue or PR has a very high priority. Efforts should be concentrated on it first. labels Aug 7, 2024
@peaBerberian peaBerberian force-pushed the fix/firefox-widevine-bug branch 3 times, most recently from fa5504b to 11e1946 Compare August 7, 2024 16:58
We noticed a pretty big issue on firefox 129 (released yesterday) on
windows) where we cannot play encrypted content anymore (seen on
production with multiple applications relying on the RxPlayer - so it's
a relatively big issue).

It seems that since this release, the
`navigator.requestMediaKeySystemAccess` EME API, which we use to poll
available decryption capabilities in the current environment, will fail
as soon as there's at least one asked "robustness" (allows for example
to ask for hardware-based DRM) even if we're asking for e.g.
software-based DRM, which we know the device has.

It seems likely this is a firefox issue, but it seems too big for us to
just do nothing and throw the bug at them.

Other streaming actors, such as Netflix and Amazon Prime Video don't
seem to be impacted by the issue at first glance.
In fact, they are, but they have a fallback call where they are calling
the `navigator.requestMediaKeySystemAccess` API without any robustness
just in case the API is broken like here.

Yet, we also have the same work-around, but we integrated both
configurations (the first with robustnesses, the second without), in the
same `navigator.requestMediaKeySystemAccess` call, whereas they're doing
two calls each with an array of a single element (the first with, the
second without like us).

So to """""fix""""" the issue, I decided to align with their
work-arounds (so the next time it breaks, browser devs will see it also
breaks Netflix and thus maybe detect the issue faster).

For the same key system type, doing one call with multiple configurations
or multiple calls with one configuration seems equivalent from my
understanding of the EME recommendation, so what I did here should
change nothing EME-wise (except more EME API calls), it is just to align
the code with others.

I still had to change our recently-added code about codec checking, to
make it work robustly in that new scenario.
@peaBerberian peaBerberian force-pushed the fix/firefox-widevine-bug branch from 11e1946 to 53d5644 Compare August 7, 2024 17:01
@peaBerberian peaBerberian merged commit e90c43a into dev Aug 9, 2024
@peaBerberian peaBerberian added this to the 4.2.0 milestone Aug 9, 2024
peaBerberian added a commit that referenced this pull request Aug 13, 2024
…cific capabilities

In #1495, we recently worked around an issue specific to firefox on
windows where asking for at least one unsupported video or audio
capability resulted (in our opinion, incorrectly) to a
`navigator.requestMediaKeySystemAccess` API call failure.

To work-around this and other similar bugs, we decided to just always
perform a second `navigator.requestMediaKeySystemAccess` call in our
logic which doesn't ask for any capability.

However, I just realized that this may break some API usages.

For example let's imagine that an application specifically set an
`audioCapabilitiesConfig` or `videoCapabilitiesConfig` in a
`loadVideo` call to ask for specific capabilities (either specific
codecs, or specific robustnesses like PlayReady SL3000 or Widevine L1).

Here, we would first perform a check with the asked capabilities, yet
also a second one without. Meaning that an application could be left
with a key system that is not the one it explicitely asked for (e.g.
we could be playing with PlayReady SL2000 when the application asked
explicitely for PlayReady SL3000).

So the fix here is to disable the "no capabilities" work-around if an
application explicitely ask for specific capabilities.
peaBerberian added a commit that referenced this pull request Sep 13, 2024
This is a backport of #1495 and #1498 for the v3
peaBerberian added a commit that referenced this pull request Sep 13, 2024
…cific capabilities

In #1495, we recently worked around an issue specific to firefox on
windows where asking for at least one unsupported video or audio
capability resulted (in our opinion, incorrectly) to a
`navigator.requestMediaKeySystemAccess` API call failure.

To work-around this and other similar bugs, we decided to just always
perform a second `navigator.requestMediaKeySystemAccess` call in our
logic which doesn't ask for any capability.

However, I just realized that this may break some API usages.

For example let's imagine that an application specifically set an
`audioCapabilitiesConfig` or `videoCapabilitiesConfig` in a
`loadVideo` call to ask for specific capabilities (either specific
codecs, or specific robustnesses like PlayReady SL3000 or Widevine L1).

Here, we would first perform a check with the asked capabilities, yet
also a second one without. Meaning that an application could be left
with a key system that is not the one it explicitely asked for (e.g.
we could be playing with PlayReady SL2000 when the application asked
explicitely for PlayReady SL3000).

So the fix here is to disable the "no capabilities" work-around if an
application explicitely ask for specific capabilities.
peaBerberian added a commit that referenced this pull request Sep 13, 2024
This is a backport of #1495 and #1498 for the v3
peaBerberian added a commit that referenced this pull request Sep 23, 2024
This is a backport of #1495 and #1498 for the v3
@peaBerberian peaBerberian deleted the fix/firefox-widevine-bug branch November 9, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This is an RxPlayer issue (unexpected result when comparing to the API) Priority: 0 (Very high) This issue or PR has a very high priority. Efforts should be concentrated on it first.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants