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

Side by Side Diff: content/test/data/media/mediarecorder_test.html

Issue 2446173002: Use RTCPeerConnection instead of webkitRTCPeerConnection (Closed)
Patch Set: rebase Created 4 years, 1 month 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>MediaStream Recoder Browser Test (w/ MediaSource)</title> 4 <title>MediaStream Recoder Browser Test (w/ MediaSource)</title>
5 </head> 5 </head>
6 <body> 6 <body>
7 <div> Record Real-Time video content browser test.</div> 7 <div> Record Real-Time video content browser test.</div>
8 <video id="video" autoplay></video> 8 <video id="video" autoplay></video>
9 <video id="remoteVideo" autoplay></video> 9 <video id="remoteVideo" autoplay></video>
10 </body> 10 </body>
(...skipping 24 matching lines...) Expand all
35 console.log(e); 35 console.log(e);
36 reportTestSuccess(); 36 reportTestSuccess();
37 } 37 }
38 } 38 }
39 39
40 // TODO(cpaulin): factor this method out of here, http://crbug.com/574503. 40 // TODO(cpaulin): factor this method out of here, http://crbug.com/574503.
41 function setupPeerConnection(stream) { 41 function setupPeerConnection(stream) {
42 return new Promise(function(resolve, reject) { 42 return new Promise(function(resolve, reject) {
43 var localStream = stream; 43 var localStream = stream;
44 var remoteStream = null; 44 var remoteStream = null;
45 var localPeerConnection = new webkitRTCPeerConnection(null); 45 var localPeerConnection = new RTCPeerConnection();
46 var remotePeerConnection = new webkitRTCPeerConnection(null); 46 var remotePeerConnection = new RTCPeerConnection();
47 47
48 function createAnswer(description) { 48 function createAnswer(description) {
49 remotePeerConnection.createAnswer(function(description) { 49 remotePeerConnection.createAnswer(function(description) {
50 remotePeerConnection.setLocalDescription(description); 50 remotePeerConnection.setLocalDescription(description);
51 localPeerConnection.setRemoteDescription(description); 51 localPeerConnection.setRemoteDescription(description);
52 }, function(error) { failTest(error.toString()); }); 52 }, function(error) { failTest(error.toString()); });
53 } 53 }
54 54
55 localPeerConnection.onicecandidate = function(event) { 55 localPeerConnection.onicecandidate = function(event) {
56 if (event.candidate) { 56 if (event.candidate) {
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 return failTest(err.toString()); 592 return failTest(err.toString());
593 }) 593 })
594 .then(function() { 594 .then(function() {
595 reportTestSuccess(); 595 reportTestSuccess();
596 }); 596 });
597 } 597 }
598 598
599 </script> 599 </script>
600 </body> 600 </body>
601 </html> 601 </html>
OLDNEW
« no previous file with comments | « content/test/data/media/datachannel_test.html ('k') | content/test/data/media/peerconnection-call.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698