From bf28cb26a326c26fdaa461ecbde049f5f031d3bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Mon, 18 Nov 2024 10:48:45 +0100 Subject: [PATCH] fix: Disable smooth codec switch on Tizen 8 (#7614) It seems all Tizen versions do not support smooth codec switch for now. Additionally I removed webOS versions listed here, as they don't have `SourceBuffer.changeType()` API anyway. They're available since Chrome 70, but webOS 5 uses Chrome 68. And rephrased docs a bit. --- lib/util/platform.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/util/platform.js b/lib/util/platform.js index 5c60bcef2c..c8771d62a4 100644 --- a/lib/util/platform.js +++ b/lib/util/platform.js @@ -642,19 +642,17 @@ shaka.util.Platform = class { /** * Returns if codec switching SMOOTH is known reliable device support. * - * Some devices are known not to support `MediaSource.changeType` + * Some devices are known not to support SourceBuffer.changeType * well. These devices should use the reload strategy. If a device - * reports that it supports `changeType` but support it unreliably - * it should be added to this list. + * reports that it supports but supports it unreliably + * it should be disallowed in this method. * * @return {boolean} */ static supportsSmoothCodecSwitching() { const Platform = shaka.util.Platform; - if (Platform.isTizen2() || Platform.isTizen3() || Platform.isTizen4() || - Platform.isTizen5() || Platform.isTizen6() || Platform.isWebOS3() || - Platform.isWebOS4() || Platform.isWebOS5() || Platform.isPS4() || - Platform.isPS5()) { + // All Tizen versions (up to Tizen 8) do not support SMOOTH so far. + if (Platform.isTizen() || Platform.isPS4() || Platform.isPS5()) { return false; } // Older chromecasts without GoogleTV seem to not support SMOOTH properly.