Skip to content

Commit

Permalink
fix: Fix DRM workaround for Tizen and Xbox with ac-4 boxes (#5812)
Browse files Browse the repository at this point in the history
`content_workarounds.js` was introduced for Tizen and Xbox platforms. We
found that that meant a regression where certain streams were unable to
be played.

This PR adds ac-4 into the content workarounds in the same was as ec-4
to ensure these streams can be played once more.
  • Loading branch information
avelad committed Oct 25, 2023
1 parent 8944ca9 commit 72a5de3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/media/content_workarounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ shaka.media.ContentWorkarounds = class {
newType: ContentWorkarounds.BOX_TYPE_ENCA_,
});
})
.fullBox('ac-4', (box) => {
boxesToModify.push({
box,
newType: ContentWorkarounds.BOX_TYPE_ENCA_,
});
})
.fullBox('mp4a', (box) => {
boxesToModify.push({
box,
Expand Down
2 changes: 1 addition & 1 deletion test/media/content_workarounds_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
describe('ContentWorkarounds', () => {
const encryptionBoxes = {
'encv': ['hev1', 'hvc1', 'avc1', 'avc3'],
'enca': ['ac-3', 'ec-3', 'mp4a'],
'enca': ['ac-3', 'ec-3', 'ac-4', 'mp4a'],
};
for (const encryptionBox of Object.keys(encryptionBoxes)) {
for (const box of encryptionBoxes[encryptionBox]) {
Expand Down

0 comments on commit 72a5de3

Please sign in to comment.