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 | 9 |
10 function getUserMediaFromHere() { | 10 function getUserMediaFromHere() { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 function showServerHelp() { | 75 function showServerHelp() { |
76 alert('You need to build and run a peerconnection_server on some ' | 76 alert('You need to build and run a peerconnection_server on some ' |
77 + 'suitable machine. To build it in chrome, just run make/ninja ' | 77 + 'suitable machine. To build it in chrome, just run make/ninja ' |
78 + 'peerconnection_server. Otherwise, read in https://code.google' | 78 + 'peerconnection_server. Otherwise, read in https://code.google' |
79 + '.com/searchframe#xSWYf0NTG_Q/trunk/peerconnection/README&q=REA' | 79 + '.com/searchframe#xSWYf0NTG_Q/trunk/peerconnection/README&q=REA' |
80 + 'DME%20package:webrtc%5C.googlecode%5C.com.'); | 80 + 'DME%20package:webrtc%5C.googlecode%5C.com.'); |
81 } | 81 } |
82 | 82 |
| 83 function toggleHelp() { |
| 84 var help = document.getElementById('help'); |
| 85 if (help.style.display == 'none') |
| 86 help.style.display = 'inline'; |
| 87 else |
| 88 help.style.display = 'none'; |
| 89 } |
| 90 |
83 function clearLog() { | 91 function clearLog() { |
84 document.getElementById('messages').innerHTML = ''; | 92 document.getElementById('messages').innerHTML = ''; |
85 document.getElementById('debug').innerHTML = ''; | 93 document.getElementById('debug').innerHTML = ''; |
86 } | 94 } |
87 | 95 |
88 window.onload = function() { | 96 window.onload = function() { |
89 replaceReturnCallback(print_); | 97 replaceReturnCallback(print_); |
90 replaceDebugCallback(debug_); | 98 replaceDebugCallback(debug_); |
91 doNotAutoAddLocalStreamWhenCalled(); | 99 doNotAutoAddLocalStreamWhenCalled(); |
92 } | 100 } |
(...skipping 18 matching lines...) Expand all Loading... |
111 | 119 |
112 console.log(message); | 120 console.log(message); |
113 document.getElementById('messages').innerHTML += message + '<br>'; | 121 document.getElementById('messages').innerHTML += message + '<br>'; |
114 } | 122 } |
115 | 123 |
116 /** @private */ | 124 /** @private */ |
117 function debug_(message) { | 125 function debug_(message) { |
118 console.log(message); | 126 console.log(message); |
119 document.getElementById('debug').innerHTML += message + '<br>'; | 127 document.getElementById('debug').innerHTML += message + '<br>'; |
120 } | 128 } |
OLD | NEW |