OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <!-- |
| 3 * Copyright 2017 The Chromium Authors. All rights reserved. |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 --> |
| 7 <html> |
| 8 <head> |
| 9 |
| 10 |
| 11 <base target="_blank"> |
| 12 |
| 13 <title>Constraints and statistics</title> |
| 14 |
| 15 |
| 16 </head> |
| 17 |
| 18 <body> |
| 19 |
| 20 <div id="container"> |
| 21 |
| 22 <h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">We
bRTC samples</a> <span>Constraints & statistics</span></h1> |
| 23 |
| 24 <section id="blurb"> |
| 25 <p>This demo shows ways to use constraints and statistics in WebRTC applic
ations.</p> |
| 26 <p>Set camera constraints, and click <strong>Get media</strong> to (re)ope
n the camera with these included. Click <strong>Connect</strong> to create a (lo
cal) peer connection. The RTCPeerConnection objects <code>localPeerConnection</c
ode> and <code>remotePeerConnection</code> can be inspected from the console.</p
> |
| 27 <p>Setting a value to zero will remove that constraint. </p> |
| 28 <p>The lefthand video shows the output of <code>getUserMedia()</code>; on
the right is the video after being passed through the peer connection. The trans
mission bitrate is displayed below the righthand video.</p> |
| 29 </section> |
| 30 |
| 31 <div> |
| 32 <button id="getMedia">Get media</button> |
| 33 <button id="connect" disabled>Connect</button> |
| 34 <button id="hangup" disabled>Hang Up</button> |
| 35 </div> |
| 36 |
| 37 |
| 38 <section id="constraints"> |
| 39 <div id="getUserMedia"> |
| 40 <div class="input"> |
| 41 <h2>Camera constraints</h2> |
| 42 <div id="minWidth"> |
| 43 <label>Min width <span>300</span>px:</label> |
| 44 <input type="range" min="0" max="1920" value="300"> |
| 45 </div> |
| 46 <div id="maxWidth"> |
| 47 <label>Max width <span>640</span>px:</label> |
| 48 <input type="range" min="0" max="1920" value="640"> |
| 49 </div> |
| 50 <div id="minHeight"> |
| 51 <label>Min height <span>200</span>px:</label> |
| 52 <input type="range" min="0" max="1080" value="200"> |
| 53 </div> |
| 54 <div id="maxHeight"> |
| 55 <label>Max height <span>480</span>px:</label> |
| 56 <input type="range" min="0" max="1080" value="480"> |
| 57 </div> |
| 58 <div id="minFramerate"> |
| 59 <label>Min frameRate <span>0</span>fps:</label> |
| 60 <input type="range" min="0" max="60" value="0"> |
| 61 </div> |
| 62 <div id="maxFramerate"> |
| 63 <label>Max frameRate <span>0</span>fps:</label> |
| 64 <input type="range" min="0" max="60" value="0"> |
| 65 </div> |
| 66 </div> |
| 67 <div id="getUserMediaConstraints" class="output"></div> |
| 68 </div> |
| 69 |
| 70 </section> |
| 71 |
| 72 <section id="video"> |
| 73 <div id="localVideo"> |
| 74 <video autoplay muted></video> |
| 75 <div></div> |
| 76 </div> |
| 77 <div id="remoteVideo"> |
| 78 <video autoplay muted></video> |
| 79 <div></div> |
| 80 <div id="bitrate"></div> |
| 81 <div id="peer"></div> |
| 82 </div> |
| 83 </section> |
| 84 |
| 85 <section id="statistics"> |
| 86 <div id="senderStats"></div> |
| 87 <div id="receiverStats"></div> |
| 88 </section> |
| 89 |
| 90 <a href="https://github.com/webrtc/samples/tree/gh-pages/src/content/peercon
nection/constraints" title="View source for this page on GitHub" id="viewSource"
>View source on GitHub</a> |
| 91 |
| 92 </div> |
| 93 |
| 94 |
| 95 |
| 96 <script src="constraints.js"></script> |
| 97 <script src="adapter.js"></script> |
| 98 <script src="common.js"></script> |
| 99 </body></html> |
OLD | NEW |