W3cubDocs

/Dart 2

RtcIceCandidate constructor

RtcIceCandidate(Map dictionary)

Implementation

factory RtcIceCandidate(Map dictionary) {
  // TODO(efortuna): Remove this check if when you can actually construct with
  // the unprefixed RTCIceCandidate in Firefox (currently both are defined,
  // but one can't be used as a constructor).
  var constructorName = JS(
      '',
      'window[#]',
      Device.isFirefox
          ? '${Device.propertyPrefix}RTCIceCandidate'
          : 'RTCIceCandidate');
  return JS('RtcIceCandidate', 'new #(#)', constructorName,
      convertDartToNative_SerializedScriptValue(dictionary));
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-html/RtcIceCandidate/RtcIceCandidate.html