Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 28 additions & 18 deletions src/scripts/browserDeviceProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ function supportedDolbyVisionProfileAv1(videoTestElement) {
return videoTestElement.canPlayType?.('video/mp4; codecs="dav1.10.06"').replace(/no/, '');
}

function canDirectPlayAnamorphicVideo() {
// Tizen applies the aspect ratio correctly
return browser.tizenVersion >= 6;
}

function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs, videoTestElement, options) {
let supported = false;
let profileContainer = container;
Expand Down Expand Up @@ -1218,12 +1223,6 @@ export default function (options) {
}

const h264CodecProfileConditions = [
{
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
},
{
Condition: 'EqualsAny',
Property: 'VideoProfile',
Expand All @@ -1245,12 +1244,6 @@ export default function (options) {
];

const hevcCodecProfileConditions = [
{
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
},
{
Condition: 'EqualsAny',
Property: 'VideoProfile',
Expand Down Expand Up @@ -1281,12 +1274,6 @@ export default function (options) {
];

const av1CodecProfileConditions = [
{
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
},
{
Condition: 'EqualsAny',
Property: 'VideoProfile',
Expand All @@ -1307,6 +1294,29 @@ export default function (options) {
}
];

if (!canDirectPlayAnamorphicVideo()) {
h264CodecProfileConditions.push({
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
});

hevcCodecProfileConditions.push({
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
});

av1CodecProfileConditions.push({
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
});
}

if (!browser.edgeUwp && !browser.tizen && !browser.web0s) {
h264CodecProfileConditions.push({
Condition: 'NotEquals',
Expand Down
Loading