From 9be3f2e7313c988245ba10fcf48e725b69633b9a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 22 Mar 2020 15:23:56 -0400 Subject: [PATCH] Merge pull request #969 from dmitrylyzo/tizen_xvid Fix XviD playback on Tizen (cherry picked from commit 31d9b3561595e2a66e25d98e5d4c976bf95fa717) Signed-off-by: Joshua M. Boniface --- src/scripts/browser.js | 3 +++ src/scripts/browserdeviceprofile.js | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/src/scripts/browser.js b/src/scripts/browser.js index 791ac7411bc..f9e19423209 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 b45bdc59bf1..337463987cc 100644 --- a/src/scripts/browserdeviceprofile.js +++ b/src/scripts/browserdeviceprofile.js @@ -214,6 +214,15 @@ define(['browser'], function (browser) { break; 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.tizenVersion >= 4) { + videoCodecs.push('h264'); + if (canPlayH265(videoTestElement, options)) { + videoCodecs.push('h265'); + videoCodecs.push('hevc'); + } + } break; case 'mpg': case 'mpeg':