Chromium Code Reviews| Index: chrome/test/data/webrtc/manual/peerconnection_manual.js |
| diff --git a/chrome/test/data/webrtc/manual/peerconnection_manual.js b/chrome/test/data/webrtc/manual/peerconnection_manual.js |
| index cf0b1d8613007112f660c778a8f83b89ba58661c..8b56035182152981aa4ddc2cc345ea160ad795e9 100644 |
| --- a/chrome/test/data/webrtc/manual/peerconnection_manual.js |
| +++ b/chrome/test/data/webrtc/manual/peerconnection_manual.js |
| @@ -209,24 +209,24 @@ function updateGetUserMediaConstraints() { |
| video: $('video').checked |
| }; |
| + if ($('video').checked == true) { |
|
phoglund_chromium
2014/06/19 10:06:59
Drop the == true (apply throughout)
jansson
2014/06/19 11:45:49
Done.
|
| + // Default optional constraints placed here. |
| + constraints.video = {optional: [{minWidth: $('video-width').value}, |
| + {minHeight: $('video-height').value}, |
| + {googLeakyBucket: true}]}; |
| + } |
| + |
| if (audioSelected.disabled == false && videoSelected.disabled == false) { |
|
phoglund_chromium
2014/06/19 10:06:59
if (!audioSelected.disabled && !videoSelected) {
jansson
2014/06/19 11:45:49
Done.
|
| var devices = getSourcesFromField_(audioSelected, videoSelected); |
| + |
| if ($('audio').checked == true) { |
|
phoglund_chromium
2014/06/19 10:06:59
Umm, what is audioSelected and videoSelected anywa
jansson
2014/06/19 11:45:49
Yes you are correct, Fixed it for both getDevices(
|
| - if (devices.audioId != null) { |
| + if (devices.audioId != null) |
| constraints.audio = {optional: [{sourceId: devices.audioId}]}; |
| - } else { |
| - constraints.audio = true; |
| - } |
| } |
| + |
| if ($('video').checked == true) { |
| - // Default optional constraints placed here. |
| - constraints.video = {optional: [{minWidth: $('video-width').value}, |
| - {minHeight: $('video-height').value}, |
| - {googLeakyBucket: true}] |
| - }; |
| - if (devices.videoId != null) { |
| + if (devices.videoId != null) |
| constraints.video.optional.push({sourceId: devices.videoId}); |
| - } |
| } |
| } |
| @@ -241,6 +241,7 @@ function updateGetUserMediaConstraints() { |
| print_('Audio for screencapture is not implemented yet, please ' + |
| 'try to set audio = false prior requesting screencapture'); |
| } |
| + |
| $('getusermedia-constraints').value = JSON.stringify(constraints, null, ' '); |
| } |
| @@ -321,7 +322,7 @@ function getDevices() { |
| } catch (exception) { |
| audio_select.disabled = true; |
| video_select.disabled = true; |
| - refresh_devices.disabled = true; |
| + get_devices.disabled = true; |
| updateGetUserMediaConstraints(); |
| error_('Device enumeration not supported. ' + exception); |
| } |