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

Side by Side Diff: chrome/test/data/webrtc/roap_call.js

Issue 10804004: Remove the deprecated PeerConnection that uses the ROAP protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed trailing whitespace in webrtc.py Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/data/webrtc/webrtc_roap_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /**
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 // Public interface towards the other javascript files, such as
8 // message_handling.js. The contract for these functions is described in
9 // message_handling.js.
10
11 function handleMessage(peerConnection, message) {
12 peerConnection.processSignalingMessage(message);
13 }
14
15 function createPeerConnection(stun_server) {
16 peerConnection = new webkitDeprecatedPeerConnection(
17 stun_server, signalingMessageCallback);
18 peerConnection.onaddstream = addStreamCallback;
19 peerConnection.onremovestream = removeStreamCallback;
20
21 return peerConnection;
22 }
23
24 function setupCall(peerConnection) {
25 peerConnection.addStream(gLocalStream);
26 }
27
28 function answerCall(peerConnection, message) {
29 peerConnection.addStream(gLocalStream);
30 handleMessage(peerConnection, message);
31 }
32
33 // Internals.
34 function signalingMessageCallback(message) {
35 sendToPeer(gRemotePeerId, message);
36 }
37
38 function addStreamCallback(event) {
39 debug('Receiving remote stream...');
40 var streamUrl = webkitURL.createObjectURL(event.stream);
41 document.getElementById('remote_view').src = streamUrl;
42
43 // This means the call has been set up.
44 returnToPyAuto('ok-call-established');
45 }
46
47 function removeStreamCallback(event) {
48 debug('Call ended.');
49 document.getElementById("remote_view").src = '';
50 }
51
52
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webrtc/webrtc_roap_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698