DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (114d8b270dbb)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<!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>