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 and joeyparrish committed May 7, 2024
1 parent bf7ac86 commit 5e68fba
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 @@ -806,8 +806,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 5e68fba

Please sign in to comment.