Bug 797671: Import Webrtc.org code from stable branch 3.12 (rev 2820) rs=jesup
[gecko.git] / media / webrtc / trunk / src / test / fuzz / corpus / template.html
blobfc717997b06f694d9d4f043416c1f18ad03b8276
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <!--
3 Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
5 Use of this source code is governed by a BSD-style license
6 that can be found in the LICENSE file in the root of the source
7 tree. An additional intellectual property rights grant can be found
8 in the file PATENTS. All contributing project authors may
9 be found in the AUTHORS file in the root of the source tree.
10 -->
11 <html>
12 <head>
13 <title>WebRTC Fuzz Test Template</title>
14 <script type="text/javascript">
15 function requestVideo() {
16 BEFORE_GET_USER_MEDIA_CALL
17 navigator.webkitGetUserMedia(FUZZ_USER_MEDIA_INPUT,
18 FUZZ_OK_CALLBACK,
19 FUZZ_FAIL_CALLBACK);
20 AFTER_GET_USER_MEDIA_CALL
23 function getUserMediaFailedCallback(error) {
24 console.log(error.code)
27 function getUserMediaOkCallback(stream) {
28 var streamUrl = webkitURL.createObjectURL(stream);
29 document.getElementById("view1").src = streamUrl;
30 stream.stop()
32 </script>
33 </head>
34 <body onload="requestVideo();">
35 <table border="0">
36 <tr>
37 <td>Local Preview</td>
38 </tr>
39 <tr>
40 <td><video width="320" height="240" id="view1"
41 autoplay="autoplay"></video></td>
42 </tr>
43 </table>
44 </body>
45 </html>