chromium/tools/perf/page_sets/webrtc_cases/resolution.html

<!DOCTYPE html>
<!--
 *  Copyright (c) 2015 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.
-->
<html>
<head>


    <base target="_blank">

    <title>getUserMedia: select resolution</title>


    <style>
        body, html {
            height: 100%;
        }

        button {
            margin: 0 10px 20px 0;
            min-width: 90px;
        }

        div#buttons {
            margin: 0 0 1em 0;
        }

        div#container {
            max-width: 100%;
        }

        #errormessage {
            display: none;
            font-size: 300%;
        }

        #videoblock {
            display: none;
        }

        p#dimensions {
            height: 1em;
            margin: 0 0 1.5em 0;
        }

        video {
            background: none;
            height: auto;
            width: auto;
        }
    </style>

</head>

<body>

<div id="container">

    <h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a> <span>getUserMedia: select resolution</span>
    </h1>
    <p></p>

    <p>This example uses <a href="https://w3c.github.io/mediacapture-main/getusermedia.html#media-track-constraints"
                            title="W3C getusermedia specification - constraints section">constraints</a>.</p>

    <p>Click a button to call <code>getUserMedia()</code> with appropriate resolution.</p>

    <div id="buttons">
        <button id="qvga">QVGA</button>
        <button id="vga">VGA</button>
        <button id="hd">HD</button>
        <button id="full-hd">Full HD</button>
        <button id="televisionFourK">Television 4K (3840x2160)</button>
        <button id="cinemaFourK">Cinema 4K (4096x2160)</button>
        <button id="eightK">8K</button>
    </div>

    <div id="videoblock">
        <p id="dimensions"></p>

        <video id="gum-res-local" playsinline autoplay></video>
        <div id="width">
            <label>Width <span></span>px:</label>
            <input type="range" min="0" max="7680" value="0">
        </div>
        <input id="sizelock" type="checkbox">Lock video size<br>
        <input id="aspectlock" type="checkbox">Lock aspect ratio<br>
    </div>
    <p id="errormessage"></p>

    <p>For more information, see <a href="http://www.html5rocks.com/en/tutorials/getusermedia/intro/"
                                    title="Media capture article by Eric Bidelman on HTML5 Rocks">Capturing Audio &amp;
        Video in HTML5</a> on HTML5 Rocks.</p>

    <a href="https://github.com/webrtc/samples/tree/gh-pages/src/content/getusermedia/resolution"
       title="View source for this page on GitHub" id="viewSource">View source on GitHub</a>
</div>



<script src="resolution.js"></script>
</body></html>