createOffer method

  1. @override
Future<RTCSessionDescription> createOffer([
  1. Map<String, dynamic>? constraints
])
override

Implementation

@override
Future<RTCSessionDescription> createOffer(
    [Map<String, dynamic>? constraints]) async {
  final args = constraints != null ? [jsutil.jsify(constraints)] : [];
  final desc = await jsutil.promiseToFuture<dynamic>(
      jsutil.callMethod(_jsPc, 'createOffer', args));
  return RTCSessionDescription(
      jsutil.getProperty(desc, 'sdp'), jsutil.getProperty(desc, 'type'));
}