Skip to content

Commit

Permalink
fix: Tizen video error fixed by checking the extended MIME type (#4973)
Browse files Browse the repository at this point in the history
Fixes #4634
  • Loading branch information
FernandoGarciaDiez authored and joeyparrish committed Apr 26, 2023
1 parent eb654b9 commit b663e99
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/polyfill/media_capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ shaka.polyfill.MediaCapabilities = class {
if (shaka.util.Platform.isChromecast()) {
isSupported =
shaka.polyfill.MediaCapabilities.canCastDisplayType_(videoConfig);
} else if (shaka.util.Platform.isTizen()) {
let extendedType = videoConfig.contentType;
if (videoConfig.width && videoConfig.height) {
extendedType += `; width=${videoConfig.width}`;
extendedType += `; height=${videoConfig.height}`;
}
if (videoConfig.framerate) {
extendedType += `; framerate=${videoConfig.framerate}`;
}
if (videoConfig.bitrate) {
extendedType += `; bitrate=${videoConfig.bitrate}`;
}
isSupported = MediaSource.isTypeSupported(extendedType);
} else {
isSupported = MediaSource.isTypeSupported(videoConfig.contentType);
}
Expand Down

0 comments on commit b663e99

Please sign in to comment.