Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Side by Side Diff: ppapi/examples/media_stream_video/media_stream_video.html

Issue 122383002: [WIP][PPAPI] Implement MediaStreamVideoTrackResource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@io_stream_cl
Patch Set: Update Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/examples/media_stream_video/media_stream_video.cc ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
7 -->
8 <head>
9 <title>Media Stream Video Example</title>
10 <script type="text/javascript">
11 var plugin;
12 var stream;
13
14 function handleMessage(message) {
15 console.log(message);
16 }
17
18 function success(s) {
19 stream = s;
20 plugin.postMessage({track: stream.getVideoTracks()[0]});
21 }
22
23 function initialize() {
24 plugin = document.getElementById('plugin');
25 plugin.addEventListener('message', handleMessage, false);
26 var constractions = {
27 "audio": false,
28 "video": {
29 "mandatory": {
30 "minWidth": "1280",
31 "minHeight": "720",
32 "minFrameRate": "30"
33 },
34 "optional": []
35 }
36 };
37 navigator.webkitGetUserMedia(constractions, success);
38 }
39
40 document.addEventListener('DOMContentLoaded', initialize, false);
41 </script>
42 </head>
43
44 <body>
45 <embed id="plugin" type="application/x-ppapi-example-media-stream-video"
46 width="320" height="240"/>
47 <div style="margin-bottom:10px">In-use device:
48 <span id="in_use_device" style="font-weight:bold">None</span>
49 </div>
50 <div id="available_devices">
51 Available device(s), choose one to open:
52 <ul>
53 <li><a href="javascript:UseDefaultDevice();">
54 Default - use NULL device ref</a></li>
55 </ul>
56 <div>
57 <ul>List retrieved by MonitorDeviceChange(), will change when
58 pluging/unpluging devices: (Notifications received:
59 <span style="font-weight:bold" id="notification_counter">0</span>
60 )</ul>
61 <ul id="monitor_list"/>
62 </div>
63 <div>
64 <ul>List retrieved by EnumerateDevices(), never updated after the page is
65 initialized:</ul>
66 <ul id="enumerate_list"/>
67 </div>
68 </div>
69 <div id="control_panel" style="display:none">
70 <a href="javascript:Stop();">Stop</a>
71 <a href="javascript:Start();">Start</a>
72 <div/>
73 <div id="status"></div>
74 </body>
75 </html>
OLDNEW
« no previous file with comments | « ppapi/examples/media_stream_video/media_stream_video.cc ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698