Chromium Code Reviews| Index: sdk/lib/html/dart2js/html_dart2js.dart |
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
| index 3bb3ec27a797671c48c9f6109aa6f4a086238033..ca7450733819c283cbdb7cf8509f694cf0251e5a 100644 |
| --- a/sdk/lib/html/dart2js/html_dart2js.dart |
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart |
| @@ -17286,7 +17286,10 @@ class RtcDtmfToneChangeEvent extends Event native "RTCDTMFToneChangeEvent" { |
| @Experimental |
| class RtcIceCandidate native "RTCIceCandidate" { |
| factory RtcIceCandidate(Map dictionary) { |
| - return JS('RtcIceCandidate', 'new RTCIceCandidate(#)', |
| + var constructorName = JS('RtcIceCandidate', 'window[#]', |
| + Device.isFirefox ? '${Device.propertyPrefix}RTCIceCandidate' : |
|
blois
2013/05/24 21:42:59
Better to do something like:
new (window.RTCIceCa
Emily Fortuna
2013/05/24 22:40:54
As discussed offline, this doesn't work because RT
|
| + 'RTCIceCandidate'); |
| + return JS('RtcIceCandidate', 'new #(#)', constructorName, |
| convertDartToNative_SerializedScriptValue(dictionary)); |
| } |
| @@ -17346,9 +17349,12 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" { |
| // Currently in Firefox some of the RTC elements are defined but throw an |
| // error unless the user has specifically enabled them in their |
| // about:config. So we have to construct an element to actually test if RTC |
| - // is supported at at the given time. |
| + // is supported at at the given time. Additionally, Firefox only supports IP |
| + // numbers (currently), so we test with a random IP address. |
| + // See https://bugzilla.mozilla.org/show_bug.cgi?id=837919 for details. |
| try { |
| - var c = new RtcPeerConnection({"iceServers": [ {"url":"stun:foo.com"}]}); |
| + var c = new RtcPeerConnection( |
| + {"iceServers": [ {"url":"stun:216.93.246.18"}]}); |
|
blois
2013/05/24 21:42:59
This feels very hacky for a supported check. Can w
Emily Fortuna
2013/05/24 22:40:54
The deal is, the basic type always "exists" in fir
|
| return c is RtcPeerConnection; |
| } catch (_) {} |
| return false; |
| @@ -17633,8 +17639,6 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" { |
| Stream<Event> get onSignalingStateChange => signalingStateChangeEvent.forTarget(this); |
| } |
| - |
| - |
| // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| @@ -17645,7 +17649,11 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" { |
| @Experimental |
| class RtcSessionDescription native "RTCSessionDescription" { |
| factory RtcSessionDescription(Map dictionary) { |
| - return JS('RtcSessionDescription', 'new RTCSessionDescription(#)', |
| + var constructorName = JS('RtcSessionDescription', 'window[#]', |
| + Device.isFirefox ? '${Device.propertyPrefix}RTCSessionDescription' : |
| + 'RTCSessionDescription'); |
| + return JS('RtcSessionDescription', |
| + 'new #(#)', constructorName, |
|
blois
2013/05/24 21:42:59
Ditto from earlier comment.
|
| convertDartToNative_SerializedScriptValue(dictionary)); |
| } |