Chromium Code Reviews| 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 /** @private */ | 7 /** @private */ |
| 8 var gTransformOutgoingSdp = function(sdp) { return sdp; } | 8 var gTransformOutgoingSdp = function(sdp) { return sdp; } |
| 9 | 9 |
| 10 /** @private */ | 10 /** @private */ |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 215 | 215 |
| 216 /** @private */ | 216 /** @private */ |
| 217 function addStreamCallback_(event) { | 217 function addStreamCallback_(event) { |
| 218 debug('Receiving remote stream...'); | 218 debug('Receiving remote stream...'); |
| 219 var videoTag = document.getElementById('remote-view'); | 219 var videoTag = document.getElementById('remote-view'); |
| 220 videoTag.src = webkitURL.createObjectURL(event.stream); | 220 videoTag.src = webkitURL.createObjectURL(event.stream); |
| 221 | 221 |
| 222 // Due to crbug.com/110938 the size is 0 when onloadedmetadata fires. | 222 // Due to crbug.com/110938 the size is 0 when onloadedmetadata fires. |
| 223 // videoTag.onloadedmetadata = updateVideoTagSize_('remote-view'); | 223 // videoTag.onloadedmetadata = updateVideoTagSize_('remote-view'); |
| 224 // Use setTimeout as a workaround for now. | 224 // Use setTimeout as a workaround for now. |
| 225 setTimeout(function() {updateVideoTagSize_('remote-view')}, 500); | 225 // setTimeout(function() {updateVideoTagSize_('remote-view')}, 500); |
|
kjellander_chromium
2013/03/25 13:33:58
Remove the unused code and update the code to be p
jansson
2013/04/05 10:29:42
Done.
| |
| 226 // Displays the remote video size for both the video element and the stream. | |
| 227 setTimeout(function() {displayVideoSize(videoTag);}, 500); | |
| 226 } | 228 } |
| 227 | 229 |
| 228 /** @private */ | 230 /** @private */ |
| 229 function removeStreamCallback_(event) { | 231 function removeStreamCallback_(event) { |
| 230 debug('Call ended.'); | 232 debug('Call ended.'); |
| 231 document.getElementById("remote-view").src = ''; | 233 document.getElementById("remote-view").src = ''; |
| 232 } | 234 } |
| 233 | 235 |
| 234 /** @private */ | 236 /** @private */ |
| 235 function onCreateDataChannelCallback_(event) { | 237 function onCreateDataChannelCallback_(event) { |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 252 // about the created data channel. | 254 // about the created data channel. |
| 253 onDataChannelReadyStateChange_(); | 255 onDataChannelReadyStateChange_(); |
| 254 } | 256 } |
| 255 | 257 |
| 256 /** @private */ | 258 /** @private */ |
| 257 function onDataChannelReadyStateChange_() { | 259 function onDataChannelReadyStateChange_() { |
| 258 var readyState = gDataChannel.readyState; | 260 var readyState = gDataChannel.readyState; |
| 259 debug('DataChannel state:' + readyState); | 261 debug('DataChannel state:' + readyState); |
| 260 gDataStatusCallback(readyState); | 262 gDataStatusCallback(readyState); |
| 261 } | 263 } |
| OLD | NEW |