blob: f349a29a679316d6f76bc1b1f23cda745a5ed933 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>media-source-allowed-containers</title>
<script src="../video-test.js"></script>
<script>
window.addEventListener('load', async event => {
if (!window.internals) {
failTest('Requires window.internals');
return;
}
run('internals.settings.setAllowedMediaContainerTypes(null)');
testExpected('MediaSource.isTypeSupported("video/mp4")', true);
video = document.createElement('video');
run('internals.settings.setAllowedMediaContainerTypes("video/mp4")');
testExpected('MediaSource.isTypeSupported("video/mp4")', true);
video = document.createElement('video');
run('internals.settings.setAllowedMediaContainerTypes("video/webm")');
testExpected('MediaSource.isTypeSupported("video/mp4")', false);
endTest();
});
</script>
</head>
<body>
</body>
</html>