Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html>
<head>
<title>MediaRecorder Start</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<canvas id="canvas" width="200" height="200">
</canvas>
<script>
function createVideoStream() {
canvas.getContext('2d');
return canvas.captureStream();
}
test(t => {
const mimeType = [ 'audio/aac', 'audio/ogg', 'audio/webm', 'audio/mp4' ].find(MediaRecorder.isTypeSupported);
const mediaRecorder = new MediaRecorder(createVideoStream(), {mimeType});
assert_throws_dom("NotSupportedError", () => mediaRecorder.start());
}, "MediaRecorder cannot record the stream using the current configuration");
</script>
</body>
</html>