blob: b5dd6f27aa0b6ab2f21c937b2154e08c60337c60 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>video-track-configuration</title>
<script src="../video-test.js"></script>
<script>
window.addEventListener('load', async event => {
findMediaElement();
run('video.src = "../content/test.mp4"');
await waitFor(video, 'canplay');
await testExpectedEventually('video.videoTracks.length', 1);
await testExpectedEventually('video.videoTracks[0].configuration', null, '!=');
await testExpectedEventually('video.videoTracks[0].configuration.codec', 'avc1.4D400D');
await testExpectedEventually('video.videoTracks[0].configuration.width', 320);
await testExpectedEventually('video.videoTracks[0].configuration.height', 240);
await testExpectedEventually('video.videoTracks[0].configuration.bitrate', 240000, '>=');
await testExpectedEventually('video.videoTracks[0].configuration.framerate', 30, '>=');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace', null, '!=');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace.matrix', 'bt470bg');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace.primaries', 'smpte170m');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace.transfer', 'bt709');
run('video.src = "../content/test-hevc.mp4"');
await waitFor(video, 'canplay');
await testExpectedEventually('video.videoTracks.length', 1);
await testExpectedEventually('video.videoTracks[0].configuration', null, '!=');
await testExpectedEventually('video.videoTracks[0].configuration.codec', 'hvc1.1.6.L93.B0');
await testExpectedEventually('video.videoTracks[0].configuration.width', 320);
await testExpectedEventually('video.videoTracks[0].configuration.height', 240);
await testExpectedEventually('video.videoTracks[0].configuration.bitrate', 150000, '>=');
await testExpectedEventually('video.videoTracks[0].configuration.framerate', 30, '>=');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace', null, '!=');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace.matrix', 'bt709');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace.primaries', 'bt709');
await testExpectedEventually('video.videoTracks[0].configuration.colorSpace.transfer', 'bt709');
endTest();
});
</script>
</head>
<body>
<video controls></video>
</body>
</html>