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

Side by Side Diff: chrome/test/data/webrtc/manual/peerconnection_manual.js

Issue 405093004: Added dataChannel.id text field to peerconnection.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/webrtc/manual/peerconnection.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 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 /** 7 /**
8 * See http://dev.w3.org/2011/webrtc/editor/getusermedia.html for more 8 * See http://dev.w3.org/2011/webrtc/editor/getusermedia.html for more
9 * information on getUserMedia. See 9 * information on getUserMedia. See
10 * http://dev.w3.org/2011/webrtc/editor/webrtc.html for more information on 10 * http://dev.w3.org/2011/webrtc/editor/webrtc.html for more information on
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 // Trigger global.dataStatusCallback so an application is notified 961 // Trigger global.dataStatusCallback so an application is notified
962 // about the created data channel. 962 // about the created data channel.
963 onDataChannelReadyStateChange_(); 963 onDataChannelReadyStateChange_();
964 } 964 }
965 965
966 /** @private */ 966 /** @private */
967 function onDataChannelReadyStateChange_() { 967 function onDataChannelReadyStateChange_() {
968 var readyState = global.dataChannel.readyState; 968 var readyState = global.dataChannel.readyState;
969 print_('DataChannel state:' + readyState); 969 print_('DataChannel state:' + readyState);
970 global.dataStatusCallback(readyState); 970 global.dataStatusCallback(readyState);
971 // Display dataChannel.id only when dataChannel is active/open.
972 if (global.dataChannel.readyState == 'open') {
973 $('data-channel-id').value = global.dataChannel.id;
974 } else if (global.dataChannel.readyState == 'closed') {
975 $('data-channel-id').value = '';
976 }
971 } 977 }
972 978
973 /** 979 /**
974 * @private 980 * @private
975 * @param {MediaStream} stream Media stream. 981 * @param {MediaStream} stream Media stream.
976 */ 982 */
977 function getUserMediaOkCallback_(stream) { 983 function getUserMediaOkCallback_(stream) {
978 global.localStream = stream; 984 global.localStream = stream;
979 global.requestWebcamAndMicrophoneResult = 'ok-got-stream'; 985 global.requestWebcamAndMicrophoneResult = 'ok-got-stream';
980 success_('getUserMedia'); 986 success_('getUserMedia');
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 1416
1411 /** @private */ 1417 /** @private */
1412 function readResponseHeader_(request, key) { 1418 function readResponseHeader_(request, key) {
1413 var value = request.getResponseHeader(key); 1419 var value = request.getResponseHeader(key);
1414 if (value == null || value.length == 0) { 1420 if (value == null || value.length == 0) {
1415 error_('Received empty value ' + value + 1421 error_('Received empty value ' + value +
1416 ' for response header key ' + key + '.'); 1422 ' for response header key ' + key + '.');
1417 } 1423 }
1418 return parseInt(value); 1424 return parseInt(value);
1419 } 1425 }
OLDNEW
« no previous file with comments | « chrome/test/data/webrtc/manual/peerconnection.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698