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

Side by Side Diff: chrome/test/data/webrtc/webrtc_video_quality_test.html

Issue 254803002: Making webrtc video quality test page generic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>WebRTC Automated Test</title> 4 <title>WebRTC Automated Test</title>
5 <script type="text/javascript" src="adapter.js"></script> 5 <script type="text/javascript" src="adapter.js"></script>
6 <script type="text/javascript" src="test_functions.js"></script> 6 <script type="text/javascript" src="test_functions.js"></script>
7 <script type="text/javascript" src="message_handling.js"></script> 7 <script type="text/javascript" src="message_handling.js"></script>
8 <script type="text/javascript" src="getusermedia.js"></script> 8 <script type="text/javascript" src="getusermedia.js"></script>
9 <script type="text/javascript" src="jsep01_call.js"></script> 9 <script type="text/javascript" src="jsep01_call.js"></script>
10 <script type="text/javascript" src="video_extraction.js"></script> 10 <script type="text/javascript" src="video_extraction.js"></script>
11 <script type="text/javascript">
12 // The test page will take default value if any of the parameters
phoglund_chromium 2014/04/25 12:26:32 I think you can make this even smarter. The video
13 // is not passed in the url.
14 var height = 640;
15 var width = 360;
16 var frameRate = 30;
17 function initialize() {
18 var parameters = window.location.search.slice(1);
19 var values = parameters.split('&');
20 for (var i = 0; i < values.length; ++i) {
21 if (values[i].indexOf("height") == 0)
22 height = values[i].slice(7);
23 if (values[i].indexOf("width") == 0)
24 width = values[i].slice(6);
25 if (values[i].indexOf("framerate") == 0)
26 frameRate = values[i].slice(10);
27 }
28 var localView = document.getElementById("local-view");
29 localView.height = height;
30 localView.width = width;
31
32 var remoteView = document.getElementById("remote-view");
33 remoteView.height = height;
34 remoteView.width = width;
35 remoteView.onplay = startFrameCapture(height, width, width, frameRate, 5);
36
37 var remoteCanvas = document.getElementById("remote-canvas");
38 remoteCanvas.height = height;
39 remoteCanvas.width = width;
40
41 var outputDiv = document.getElementById("output");
42 outputDiv.style.display = "inline-block";
43 outputDiv.style.position = "relative";
44 outputDiv.style.width = width;
45 outputDiv.style.height = height;
46 }
47 </script>
11 </head> 48 </head>
12 <body> 49 <body onload="initialize()">
13 <table border="0"> 50 <table border="0">
14 <tr> 51 <tr>
15 <td>Local Preview</td> 52 <td>Local Preview</td>
16 <td>Remote Video</td> 53 <td>Remote Video</td>
17 </tr> 54 </tr>
18 <tr> 55 <tr>
19 <td> 56 <td>
20 <video width="640" height="360" id="local-view" 57 <video id="local-view" autoplay="autoplay"></video>
21 autoplay="autoplay"></video>
22 </td> 58 </td>
23 <td> 59 <td>
24 <!-- startFrameCapture() takes 5 parameters: 60 <!-- startFrameCapture() takes 5 parameters:
25 1. width: width of the video/canvas area. 61 1. width: width of the video/canvas area.
26 2. height: height of the video area. 62 2. height: height of the video area.
27 3. canvas_height: Height of the canvas. 63 3. canvas_height: Height of the canvas.
28 4. fps: fps at which we would like to sample. 64 4. fps: fps at which we would like to sample.
29 5. duration: The duration of the capturing. --> 65 5. duration: The duration of the capturing. -->
30 <video width="640" height="360" id="remote-view" 66 <video id="remote-view" autoplay="autoplay"></video>
31 autoplay="autoplay" onplay="startFrameCapture(640,360,360,30,5)">
32 </video>
33 </td> 67 </td>
34 </tr> 68 </tr>
35 <tr> 69 <tr>
36 <td></td> 70 <td></td>
37 <td> 71 <td>
38 <div id="output" style="display: inline-block; 72 <div id="output">
39 position: relative; width: 640; height: 360">
40 <!-- Canvas height should be equal to video height if we want to 73 <!-- Canvas height should be equal to video height if we want to
41 capture the whole frames. If we only want to capture the barcode, 74 capture the whole frames. If we only want to capture the barcode,
42 canvas height should equal the barcode height. --> 75 canvas height should equal the barcode height. -->
43 <canvas id="remote-canvas" width="640" height="360"></canvas> 76 <canvas id="remote-canvas"></canvas>
44 </div> 77 </div>
45 </td> 78 </td>
46 </tr> 79 </tr>
47 </table> 80 </table>
48 </body> 81 </body>
49 </html> 82 </html>
OLDNEW
« no previous file with comments | « chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698