blob: 249e47a5d8795f5f3fed4bb80cc322468772659d [file] [log] [blame]
<!DOCTYPE html>
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<script>
// Check one Video format that should be recordable and another that should be.
// Supported formats return "maybe". Same for Audio.
// https://w3c.github.io/mediacapture-record/MediaRecorder.html#methods
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("video/invalid"), "");
}, 'check MediaRecorder.canRecordMimeType() with video/invalid');
test(function() {
assert_equals(MediaRecorder.canRecordMimeType('video/webm, codecs="vp8"'), "maybe");
}, 'check MediaRecorder.canRecordMimeType() with video/webm and vp8');
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("audio/invalid"), "");
}, 'check MediaRecorder.canRecordMimeType() with audio/invalid');
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("audio/webm;codecs=opus"), "maybe");
}, 'check MediaRecorder.canRecordMimeType() with audio/webm and opus');
</script>