From 99d7138a083ed92993eb07af3ab27d5bfb486fb6 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sun, 22 Mar 2020 14:00:04 +0300 Subject: [PATCH 1/3] Fix XviD playback on Tizen --- src/scripts/browserdeviceprofile.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/scripts/browserdeviceprofile.js b/src/scripts/browserdeviceprofile.js index b45bdc59b..85d3e1500 100644 --- a/src/scripts/browserdeviceprofile.js +++ b/src/scripts/browserdeviceprofile.js @@ -214,6 +214,14 @@ define(['browser'], function (browser) { break; case 'avi': supported = browser.tizen || browser.orsay || browser.web0s || browser.edgeUwp; + // New Samsung TV don't support XviD/DivX + if (browser.tizen) { + videoCodecs.push('h264'); + if (canPlayH265(videoTestElement, options)) { + videoCodecs.push('h265'); + videoCodecs.push('hevc'); + } + } break; case 'mpg': case 'mpeg': From 603472cfb69516cb83270c4dfece64aa455edb92 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sun, 22 Mar 2020 15:04:51 +0300 Subject: [PATCH 2/3] Add comment --- src/scripts/browserdeviceprofile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripts/browserdeviceprofile.js b/src/scripts/browserdeviceprofile.js index 85d3e1500..7acad63c1 100644 --- a/src/scripts/browserdeviceprofile.js +++ b/src/scripts/browserdeviceprofile.js @@ -215,6 +215,7 @@ define(['browser'], function (browser) { case 'avi': 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) { videoCodecs.push('h264'); if (canPlayH265(videoTestElement, options)) { From d6ab058661b70258a2a1629cbe91a96542b3519f Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sun, 22 Mar 2020 20:18:27 +0300 Subject: [PATCH 3/3] 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');