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

Unified Diff: ppapi/examples/video_effects/video_effects.html

Issue 2365883002: Expose the MediaStream interface (Closed)
Patch Set: drop TODO Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/data/media/peerconnection-call.html ('k') | ppapi/tests/test_video_destination.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/video_effects/video_effects.html
diff --git a/ppapi/examples/video_effects/video_effects.html b/ppapi/examples/video_effects/video_effects.html
index f7dd0ce0abdf91b31b20d4322611448c59433f41..fa37d59b81c489506c45916c10be8166b2663445 100644
--- a/ppapi/examples/video_effects/video_effects.html
+++ b/ppapi/examples/video_effects/video_effects.html
@@ -92,7 +92,7 @@ function start() {
// Call into getUserMedia via the polyfill (adapter.js).
getUserMedia({audio:false, video:true},
gotStream, function() {});
-}
+}
function onRegisterStreamDone() {
vidprocessedlocal.src = URL.createObjectURL(processedLocalstream);
@@ -111,7 +111,7 @@ function HandleMessage(message_event) {
function initEffect() {
var url = URL.createObjectURL(localstream);
- processedLocalstream = new webkitMediaStream([]);
+ processedLocalstream = new MediaStream([]);
var processedStreamUrl = URL.createObjectURL(processedLocalstream);
effectsPlugin.postMessage(
'registerStream' + ' ' + url + ' ' + processedStreamUrl);
@@ -127,7 +127,7 @@ function toggleEffect() {
effectsPlugin.postMessage('effectOff');
}
}
-
+
function call() {
callButton.disabled = true;
hangupButton.disabled = false;
@@ -135,15 +135,15 @@ function call() {
var servers = null;
pc1 = new RTCPeerConnection(servers);
trace("Created local peer connection object pc1");
- pc1.onicecandidate = iceCallback1;
+ pc1.onicecandidate = iceCallback1;
pc2 = new RTCPeerConnection(servers);
trace("Created remote peer connection object pc2");
pc2.onicecandidate = iceCallback2;
- pc2.onaddstream = gotRemoteStream;
+ pc2.onaddstream = gotRemoteStream;
pc1.addStream(processedLocalstream);
trace("Adding Local Stream to peer connection");
-
+
pc1.createOffer(gotDescription1);
}
@@ -155,7 +155,7 @@ function gotDescription1(desc){
// to pass in the right constraints in order for it to
// accept the incoming offer of audio and video.
var sdpConstraints = {'mandatory': {
- 'OfferToReceiveAudio':true,
+ 'OfferToReceiveAudio':true,
'OfferToReceiveVideo':true }};
pc2.createAnswer(gotDescription2, null, sdpConstraints);
}
@@ -168,7 +168,7 @@ function gotDescription2(desc){
function hangup() {
trace("Ending call");
- pc1.close();
+ pc1.close();
pc2.close();
pc1 = null;
pc2 = null;
@@ -187,7 +187,7 @@ function iceCallback1(event){
trace("Local ICE candidate: \n" + event.candidate.candidate);
}
}
-
+
function iceCallback2(event){
if (event.candidate) {
pc1.addIceCandidate(new RTCIceCandidate(event.candidate));
@@ -204,5 +204,3 @@ document.addEventListener('DOMContentLoaded', InitializePlugin, false);
</script>
</body>
</html>
-
-
« no previous file with comments | « content/test/data/media/peerconnection-call.html ('k') | ppapi/tests/test_video_destination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698