summaryrefslogtreecommitdiffstats
path: root/dom/media/test/crashtests/1594466.html
blob: 276c5fe3d171b4b48d69c0e0c96866fb5c03def3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<head>
<script>
function start() {
  const ac = new AudioContext();
  const {stream: audioStream} = ac.createMediaStreamDestination();
  const [audioTrack] = audioStream.getTracks();
  const canvas = document.createElement("canvas");
  const ctx = canvas.getContext("2d");
  const [videoTrack] = canvas.captureStream().getTracks();

  const rec = new MediaRecorder(new MediaStream([audioTrack, videoTrack]), {
    mimeType: 'video/webm; codecs="vp8, opus"'
  });
  rec.start();
}

document.addEventListener('DOMContentLoaded', start)
</script>
</head>
</html>