Skip to content

Commit

Permalink
fix: Fix flac detection in Safari (#6497)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Apr 29, 2024
1 parent 2dd85e4 commit 0e00d65
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/util/stream_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,12 @@ shaka.util.StreamUtils = class {
// currently don't support 'fLaC', while 'flac' is supported by most
// major browsers.
// See https://bugs.chromium.org/p/chromium/issues/detail?id=1422728
if (codecs === 'fLaC' && !shaka.util.Platform.isSafari()) {
return 'flac';
if (codecs.toLowerCase() == 'flac') {
if (!shaka.util.Platform.isSafari()) {
return 'flac';
} else {
return 'fLaC';
}
}

// The same is true for 'Opus'.
Expand Down

0 comments on commit 0e00d65

Please sign in to comment.