summaryrefslogtreecommitdiffstats
path: root/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeVideo.html
blob: b98cfc6a4fefcf567f32cafd73154b8a77d3a62e (plain)
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
<!DOCTYPE HTML>
<html>
<meta charset="utf-8">
<head>
  <title>Test MediaStreamTrackAudioSourceNode throw video track</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="/tests/dom/media/webaudio/test/webaudio.js"></script>
  <script type="text/javascript" src="/tests/dom/media/webrtc/tests/mochitests/head.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
  let context = new AudioContext();
  let canvas = document.createElement("canvas");
  canvas.getContext("2d");
  let track = canvas.captureStream().getTracks()[0];

  expectException(() => {
    let mediaStreamTrackSource = new MediaStreamTrackAudioSourceNode(
      context,
      { mediaStreamTrack: track });
  }, DOMException.INVALID_STATE_ERR);
</script>
</pre>
</body>
</html>