From d6ab058661b70258a2a1629cbe91a96542b3519f Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sun, 22 Mar 2020 20:18:27 +0300 Subject: [PATCH] Add Tizen version check --- src/scripts/browser.js | 3 +++ src/scripts/browserdeviceprofile.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripts/browser.js b/src/scripts/browser.js index 791ac7411..f9e194232 100644 --- a/src/scripts/browser.js +++ b/src/scripts/browser.js @@ -271,6 +271,9 @@ define([], function () { if (!browser.tizen) { browser.orsay = userAgent.toLowerCase().indexOf('smarthub') !== -1; + } else { + var v = (navigator.appVersion).match(/Tizen (\d+).(\d+)/); + browser.tizenVersion = parseInt(v[1]); } if (browser.edgeUwp) { diff --git a/src/scripts/browserdeviceprofile.js b/src/scripts/browserdeviceprofile.js index 7acad63c1..337463987 100644 --- a/src/scripts/browserdeviceprofile.js +++ b/src/scripts/browserdeviceprofile.js @@ -216,7 +216,7 @@ define(['browser'], function (browser) { supported = browser.tizen || browser.orsay || browser.web0s || browser.edgeUwp; // New Samsung TV don't support XviD/DivX // Explicitly add supported codecs to make other codecs be transcoded - if (browser.tizen) { + if (browser.tizenVersion >= 4) { videoCodecs.push('h264'); if (canPlayH265(videoTestElement, options)) { videoCodecs.push('h265');