OLD | NEW |
1 /** | 1 /** |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 // The *Here functions are called from peerconnection.html and will make calls | 7 // The *Here functions are called from peerconnection.html and will make calls |
8 // into our underlying JavaScript library with the values from the page | 8 // into our underlying JavaScript library with the values from the page |
9 // (have to be named differently to avoid name clashes with existing functions). | 9 // (have to be named differently to avoid name clashes with existing functions). |
10 | 10 |
11 function getUserMediaFromHere() { | 11 function getUserMediaFromHere() { |
12 var constraints = $('getusermedia-constraints').value; | 12 var constraints = $('getusermedia-constraints').value; |
13 try { | 13 try { |
14 doGetUserMedia(constraints); | 14 getUserMedia(constraints); |
15 } catch (exception) { | 15 } catch (exception) { |
16 print_('getUserMedia says: ' + exception); | 16 print_('getUserMedia says: ' + exception); |
17 } | 17 } |
18 } | 18 } |
19 | 19 |
20 function connectFromHere() { | 20 function connectFromHere() { |
21 var server = $('server').value; | 21 var server = $('server').value; |
22 if ($('peer-id').value == '') { | 22 if ($('peer-id').value == '') { |
23 // Generate a random name to distinguish us from other tabs: | 23 // Generate a random name to distinguish us from other tabs: |
24 $('peer-id').value = 'peer_' + Math.floor(Math.random() * 10000); | 24 $('peer-id').value = 'peer_' + Math.floor(Math.random() * 10000); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 setOnToneChange(function(tone) { | 310 setOnToneChange(function(tone) { |
311 debug('Sent DTMF tone: ' + tone.tone); | 311 debug('Sent DTMF tone: ' + tone.tone); |
312 $('dtmf-tones-sent').value = | 312 $('dtmf-tones-sent').value = |
313 tone.tone + '\n' + $('dtmf-tones-sent').value; | 313 tone.tone + '\n' + $('dtmf-tones-sent').value; |
314 }); | 314 }); |
315 } | 315 } |
316 | 316 |
317 $ = function(id) { | 317 $ = function(id) { |
318 return document.getElementById(id); | 318 return document.getElementById(id); |
319 }; | 319 }; |
OLD | NEW |