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

fix(DRM): broken keySystemsMapping due to multiple references of drmInfo #5388

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

tykus160
Copy link
Member

@tykus160 tykus160 commented Jul 3, 2023

Different streams may share drmInfo references, which makes problem when keySystemsMapping config is used. Assuming we have config:

drm: {
  servers: {
    'a.b.c': '...',
  },
  keySystemsMapping: {
    'a.b.c': 'd.e.f',
  },
}

on the first access to the drmInfo object DrmEngine will set server for a.b.c key system and replace key system to d.e.f. On the 2nd access DrmEngine will not find server config for d.e.f and thus will remove any server set.
This issue can be easily mitigated by deduplicating drmInfo array.

@avelad avelad added type: bug Something isn't working correctly component: EME The issue involves the Encrypted Media Extensions web API priority: P1 Big impact or workaround impractical; resolve before feature release labels Jul 3, 2023
@avelad avelad added this to the v4.4 milestone Jul 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

Incremental code coverage: 100.00%

@avelad avelad merged commit 6513ac0 into shaka-project:main Jul 3, 2023
@tykus160 tykus160 deleted the wt-key-mapping-fix branch July 3, 2023 07:35
joeyparrish pushed a commit that referenced this pull request Jul 20, 2023
…nfo (#5388)

Different streams may share `drmInfo` references, which makes problem
when `keySystemsMapping` config is used. Assuming we have config:
```js
drm: {
  servers: {
    'a.b.c': '...',
  },
  keySystemsMapping: {
    'a.b.c': 'd.e.f',
  },
}
```
on the first access to the `drmInfo` object `DrmEngine` will set server
for `a.b.c` key system and replace key system to `d.e.f`. On the 2nd
access DrmEngine will not find server config for `d.e.f` and thus will
remove any server set.
This issue can be easily mitigated by deduplicating `drmInfo` array.
joeyparrish pushed a commit that referenced this pull request Jul 20, 2023
…nfo (#5388)

Different streams may share `drmInfo` references, which makes problem
when `keySystemsMapping` config is used. Assuming we have config:
```js
drm: {
  servers: {
    'a.b.c': '...',
  },
  keySystemsMapping: {
    'a.b.c': 'd.e.f',
  },
}
```
on the first access to the `drmInfo` object `DrmEngine` will set server
for `a.b.c` key system and replace key system to `d.e.f`. On the 2nd
access DrmEngine will not find server config for `d.e.f` and thus will
remove any server set.
This issue can be easily mitigated by deduplicating `drmInfo` array.
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Sep 1, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: EME The issue involves the Encrypted Media Extensions web API priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants