OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <!-- saved from url=(0072)https://webrtc.github.io/samples/src/content/peerconne
ction/constraints/ --> |
| 3 <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 4 |
| 5 |
| 6 <meta name="description" content="WebRTC code samples"> |
| 7 <meta name="viewport" content="width=device-width, user-scalable=yes, initial-
scale=1, maximum-scale=1"> |
| 8 <meta itemprop="description" content="Client-side WebRTC code samples"> |
| 9 <meta itemprop="image" content="../../../images/webrtc-icon-192x192.png"> |
| 10 <meta itemprop="name" content="WebRTC code samples"> |
| 11 <meta name="mobile-web-app-capable" content="yes"> |
| 12 <meta id="theme-color" name="theme-color" content="#ffffff"> |
| 13 |
| 14 <!--<base target="_blank">--><base href="." target="_blank"> |
| 15 |
| 16 <title>Constraints and statistics</title> |
| 17 |
| 18 <link rel="icon" sizes="192x192" href="https://webrtc.github.io/samples/src/im
ages/webrtc-icon-192x192.png"> |
| 19 <link href="./peerconnection_files/css" rel="stylesheet" type="text/css"> |
| 20 <link rel="stylesheet" href="./peerconnection_files/main.css"> |
| 21 <link rel="stylesheet" href="./peerconnection_files/main(1).css"> |
| 22 |
| 23 </head> |
| 24 |
| 25 <body> |
| 26 |
| 27 <div id="container"> |
| 28 |
| 29 <h1><a href="https://webrtc.github.io/samples/" title="WebRTC samples homepa
ge">WebRTC samples</a> <span>Constraints & statistics</span></h1> |
| 30 |
| 31 <section id="blurb"> |
| 32 <p>This demo shows ways to use constraints and statistics in WebRTC applic
ations.</p> |
| 33 <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
> |
| 34 <p>Setting a value to zero will remove that constraint. </p> |
| 35 <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> |
| 36 </section> |
| 37 |
| 38 <div> |
| 39 <button id="getMedia">Get media</button> |
| 40 <button id="connect" disabled="">Connect</button> |
| 41 <button id="hangup" disabled="">Hang Up</button> |
| 42 </div> |
| 43 |
| 44 |
| 45 <section id="constraints"> |
| 46 <div id="getUserMedia"> |
| 47 <div class="input"> |
| 48 <h2>Camera constraints</h2> |
| 49 <div id="minWidth"> |
| 50 <label>Min width <span>300</span>px:</label> |
| 51 <input type="range" min="0" max="1920" value="300"> |
| 52 </div> |
| 53 <div id="maxWidth"> |
| 54 <label>Max width <span>640</span>px:</label> |
| 55 <input type="range" min="0" max="1920" value="640"> |
| 56 </div> |
| 57 <div id="minHeight"> |
| 58 <label>Min height <span>200</span>px:</label> |
| 59 <input type="range" min="0" max="1080" value="200"> |
| 60 </div> |
| 61 <div id="maxHeight"> |
| 62 <label>Max height <span>480</span>px:</label> |
| 63 <input type="range" min="0" max="1080" value="480"> |
| 64 </div> |
| 65 <div id="minFramerate"> |
| 66 <label>Min frameRate <span>0</span>fps:</label> |
| 67 <input type="range" min="0" max="60" value="0"> |
| 68 </div> |
| 69 <div id="maxFramerate"> |
| 70 <label>Max frameRate <span>0</span>fps:</label> |
| 71 <input type="range" min="0" max="60" value="0"> |
| 72 </div> |
| 73 </div> |
| 74 <div id="getUserMediaConstraints" class="output">{ |
| 75 "audio": true, |
| 76 "video": { |
| 77 "width": { |
| 78 "min": "300", |
| 79 "max": "640" |
| 80 }, |
| 81 "height": { |
| 82 "min": "200", |
| 83 "max": "480" |
| 84 } |
| 85 } |
| 86 }</div> |
| 87 </div> |
| 88 |
| 89 </section> |
| 90 |
| 91 <section id="video"> |
| 92 <div id="localVideo"> |
| 93 <video autoplay="" muted=""></video> |
| 94 <div></div> |
| 95 </div> |
| 96 <div id="remoteVideo"> |
| 97 <video autoplay="" muted=""></video> |
| 98 <div></div> |
| 99 <div id="bitrate"></div> |
| 100 <div id="peer"></div> |
| 101 </div> |
| 102 </section> |
| 103 |
| 104 <section id="statistics"> |
| 105 <div id="senderStats"></div> |
| 106 <div id="receiverStats"></div> |
| 107 </section> |
| 108 |
| 109 <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> |
| 110 |
| 111 </div> |
| 112 |
| 113 <script async="" src="./peerconnection_files/analytics.js"></script><script sr
c="./peerconnection_files/adapter-latest.js"></script> |
| 114 <script src="./peerconnection_files/common.js"></script> |
| 115 <script src="./peerconnection_files/main.js"></script> |
| 116 <script src="./peerconnection_files/ga.js"></script> |
| 117 |
| 118 |
| 119 |
| 120 </body></html> |
OLD | NEW |