blob: 6e70acf4862cc2c0f10d0b2642994bf04f794e44 [file] [log] [blame]
<!DOCTYPE html>
<title>Start a MediaRecorder</title>
<html>
<body>
<canvas id="canvas" width="200px" height="200px"></canvas>
<script>
var context;
var recorder;
var video;
function createVideoStream() {
const canvas = document.getElementById("canvas");
context = canvas.getContext('2d');
return canvas.captureStream();
}
function drawSomethingOnCanvas() {
context.fillStyle = "red";
context.fillRect(0, 0, 10, 10);
}
function prepareForTest() {
video = createVideoStream();
recorder = new MediaRecorder(video);
}
</script>
</body>
</html>