Add proper checks for VC-1

This commit is contained in:
MrTimscampi 2020-06-09 21:50:12 +02:00
parent 6fab78d49f
commit 58338ebb49

View File

@ -159,8 +159,8 @@ define(['browser'], function (browser) {
return browser.tizen || browser.web0s || browser.edgeUwp;
}
function supportsVc1() {
return browser.tizen || browser.web0s || browser.edgeUwp;
function supportsVc1(videoTestElement) {
return browser.tizen || browser.web0s || browser.edgeUwp || videoTestElement.canPlayType('video/mp4; codecs="vc-1"').replace(/no/, '');
}
function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs, videoTestElement, options) {
@ -206,7 +206,7 @@ define(['browser'], function (browser) {
case 'm2ts':
supported = browser.tizen || browser.web0s || browser.edgeUwp;
videoCodecs.push('h264');
if (supportsVc1()) {
if (supportsVc1(videoTestElement)) {
videoCodecs.push('vc1');
}
if (supportsMpeg2Video()) {
@ -224,7 +224,7 @@ define(['browser'], function (browser) {
videoCodecs.push('h265');
videoCodecs.push('hevc');
}
if (supportsVc1()) {
if (supportsVc1(videoTestElement)) {
videoCodecs.push('vc1');
}
if (supportsMpeg2Video()) {
@ -366,11 +366,7 @@ define(['browser'], function (browser) {
videoAudioCodecs.push('mp2');
}
<<<<<<< HEAD
var supportsDts = browser.tizen || browser.web0s || options.supportsDts;
=======
var supportsDts = browser.tizen || browser.web0s || options.supportsDts || videoTestElement.canPlayType('video/mp4; codecs="dts-"') || videoTestElement.canPlayType('video/mp4; codecs="dts+"');
>>>>>>> 3706d4884... Add proper checks for DTS
// DTS audio not supported in 2018 models (Tizen 4.0)
if (browser.tizenVersion >= 4) {
@ -435,7 +431,7 @@ define(['browser'], function (browser) {
mp4VideoCodecs.push('mpeg2video');
}
if (supportsVc1()) {
if (supportsVc1(videoTestElement)) {
mp4VideoCodecs.push('vc1');
}