1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #2971 from jellyfin/webos-dts-support

Fix webOS DTS audio support
This commit is contained in:
Bill Thornton 2021-10-27 00:41:33 -04:00 committed by GitHub
commit b6a13e426e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 7 deletions

View file

@ -387,11 +387,14 @@ import browser from './browser';
videoAudioCodecs.push('mp2');
}
let supportsDts = browser.tizen || browser.web0s || options.supportsDts || videoTestElement.canPlayType('video/mp4; codecs="dts-"').replace(/no/, '') || videoTestElement.canPlayType('video/mp4; codecs="dts+"').replace(/no/, '');
let supportsDts = options.supportsDts;
if (supportsDts == null) {
supportsDts = browser.tizen || browser.web0sVersion || videoTestElement.canPlayType('video/mp4; codecs="dts-"').replace(/no/, '') || videoTestElement.canPlayType('video/mp4; codecs="dts+"').replace(/no/, '');
// DTS audio not supported in 2018 models (Tizen 4.0)
if (browser.tizenVersion >= 4) {
supportsDts = false;
// DTS audio is not supported by Samsung TV 2018+ (Tizen 4.0+) and LG TV 2020+ (webOS 5.0+) models
if (browser.tizenVersion >= 4 || browser.web0sVersion >= 5) {
supportsDts = false;
}
}
if (supportsDts) {