Skip to content

Commit

Permalink
Merge pull request #969 from dmitrylyzo/tizen_xvid
Browse files Browse the repository at this point in the history
Fix XviD playback on Tizen

(cherry picked from commit 31d9b35)
Signed-off-by: Joshua M. Boniface <[email protected]>
  • Loading branch information
joshuaboniface committed Mar 22, 2020
1 parent 44c7b75 commit 9be3f2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scripts/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 9 additions & 0 deletions src/scripts/browserdeviceprofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 9be3f2e

Please sign in to comment.