BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/630004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2349 4adac7df-926f-26a2-2b94-8c16560cd09d
68 lines
2.2 KiB
HTML
68 lines
2.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<!--
|
|
Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
|
|
Use of this source code is governed by a BSD-style license
|
|
that can be found in the LICENSE file in the root of the source
|
|
tree. An additional intellectual property rights grant can be found
|
|
in the file PATENTS. All contributing project authors may
|
|
be found in the AUTHORS file in the root of the source tree.
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>Multiple Local Preview (Video Only)</title>
|
|
<script type="text/javascript">
|
|
function requestVideo() {
|
|
navigator.webkitGetUserMedia({video: true, audio: false},
|
|
getUserMediaOkCallback,
|
|
getUserMediaFailedCallback);
|
|
}
|
|
|
|
function getUserMediaFailedCallback(error) {
|
|
alert("User media request denied with error code " + error.code);
|
|
}
|
|
|
|
function getUserMediaOkCallback(stream) {
|
|
var streamUrl = webkitURL.createObjectURL(stream);
|
|
for (var i = 1; i <= 10; i++) {
|
|
document.getElementById("view" + i).src = streamUrl;
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="requestVideo();">
|
|
<table border="0">
|
|
<tr>
|
|
<td>Local Preview</td>
|
|
</tr>
|
|
<tr>
|
|
<td><video width="320" height="240" id="view1"
|
|
autoplay="autoplay"></video></td>
|
|
<td><video width="320" height="240" id="view2"
|
|
autoplay="autoplay"></video></td>
|
|
<td><video width="320" height="240" id="view3"
|
|
autoplay="autoplay"></video></td>
|
|
</tr>
|
|
<tr>
|
|
<td><video width="320" height="240" id="view4"
|
|
autoplay="autoplay"></video></td>
|
|
<td><video width="320" height="240" id="view5"
|
|
autoplay="autoplay"></video></td>
|
|
<td><video width="320" height="240" id="view6"
|
|
autoplay="autoplay"></video></td>
|
|
</tr>
|
|
<tr>
|
|
<td><video width="320" height="240" id="view7"
|
|
autoplay="autoplay"></video></td>
|
|
<td><video width="320" height="240" id="view8"
|
|
autoplay="autoplay"></video></td>
|
|
<td><video width="320" height="240" id="view9"
|
|
autoplay="autoplay"></video></td>
|
|
</tr>
|
|
<tr>
|
|
<td><video width="320" height="240" id="view10"
|
|
autoplay="autoplay"></video></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html> |