From 59bd00a92aeb052f5a77dabd4c5c360932a5b09a Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sat, 25 Sep 2021 13:50:47 +0300 Subject: [PATCH] Don't override explicitly defined DTS support --- src/scripts/browserDeviceProfile.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index 28cc0dcef..57819e8ec 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -387,11 +387,14 @@ import browser from './browser'; videoAudioCodecs.push('mp2'); } - let supportsDts = browser.tizen || browser.web0sVersion || 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 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; + // 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) {