Skip to content

Commit

Permalink
fix: Reject TS content on all platforms and transmux always (#6382)
Browse files Browse the repository at this point in the history
Related to #6334
Related to
#6320 (comment)
Also reverts #6045
since now it is not necessary
  • Loading branch information
avelad committed Apr 8, 2024
1 parent 4d5727d commit 74644d3
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions lib/polyfill/mediasource.js
Expand Up @@ -32,12 +32,6 @@ shaka.polyfill.MediaSource = class {

if (!window.MediaSource && !window.ManagedMediaSource) {
shaka.log.info('No MSE implementation available.');
} else if (shaka.util.Platform.isChromecast()) {
shaka.log.info('Patching Chromecast MSE bugs.');
// Chromecast fails on some TS content, even though it is supposed to
// support it. Better to transmux.
// See https://github.com/shaka-project/shaka-player/issues/5278
shaka.polyfill.MediaSource.rejectContainer_('mp2t');
} else if (safariVersion) {
// NOTE: shaka.Player.isBrowserSupported() has its own restrictions on
// Safari version.
Expand Down Expand Up @@ -73,11 +67,6 @@ shaka.polyfill.MediaSource = class {
// Bug filed: https://bugs.webkit.org/show_bug.cgi?id=165342
shaka.polyfill.MediaSource.stubAbort_();
}
} else if (shaka.util.Platform.isEdge()) {
shaka.log.info('Rejecting TS container.');
// TS content is broken on Edge in general.
// See https://github.com/shaka-project/shaka-player/issues/4955
shaka.polyfill.MediaSource.rejectContainer_('mp2t');
} else if (shaka.util.Platform.isTizen2() ||
shaka.util.Platform.isTizen3() ||
shaka.util.Platform.isTizen4()) {
Expand All @@ -90,6 +79,14 @@ shaka.polyfill.MediaSource = class {
shaka.log.info('Using native MSE as-is.');
}

if (window.MediaSource || window.ManagedMediaSource) {
// TS content is broken on all browsers in general.
// See https://github.com/shaka-project/shaka-player/issues/4955
// See https://github.com/shaka-project/shaka-player/issues/5278
// See https://github.com/shaka-project/shaka-player/issues/6334
shaka.polyfill.MediaSource.rejectContainer_('mp2t');
}

if (window.MediaSource &&
MediaSource.isTypeSupported('video/webm; codecs="vp9"') &&
!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')) {
Expand Down

0 comments on commit 74644d3

Please sign in to comment.