From eb01c60b2746907692f9b76cc7dfda55d5cd2056 Mon Sep 17 00:00:00 2001 From: FernandoGarciaDiez Date: Mon, 6 Mar 2023 22:26:53 +0100 Subject: [PATCH] fix: Tizen video error fixed by checking the extended MIME type (#4973) Fixes #4634 --- lib/polyfill/media_capabilities.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/polyfill/media_capabilities.js b/lib/polyfill/media_capabilities.js index ce9372cc90..0734390b9f 100644 --- a/lib/polyfill/media_capabilities.js +++ b/lib/polyfill/media_capabilities.js @@ -119,6 +119,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 = Capabilities.isTypeSupported(extendedType); } else { isSupported = Capabilities.isTypeSupported(videoConfig.contentType); }