Skip to content

Commit

Permalink
fix: Disable smooth codec switch on Tizen 8 (#7614)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tykus160 authored Nov 18, 2024
1 parent 13186bd commit cd6aae7
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/util/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>SourceBuffer.changeType</code>
* 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 <code<changeType</code> 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.
Expand Down

0 comments on commit cd6aae7

Please sign in to comment.