RTCRtpCapabilities.fromMap constructor
RTCRtpCapabilities.fromMap(
- Map map
Implementation
factory RTCRtpCapabilities.fromMap(Map<dynamic, dynamic> map) {
var codecs = <RTCRtpCodecCapability>[];
dynamic codecsMap = map['codecs'];
codecsMap.forEach((params) {
codecs.add(RTCRtpCodecCapability.fromMap(params));
});
var headerExtensions = <RTCRtpHeaderExtensionCapability>[];
dynamic headerExtensionsMap = map['headerExtensions'];
headerExtensionsMap.forEach((params) {
headerExtensions.add(RTCRtpHeaderExtensionCapability.fromMap(params));
});
var fecMechanisms = <String>[];
dynamic fecMechanismsMap = map['fecMechanisms'];
fecMechanismsMap.forEach((params) {
fecMechanisms.add(params);
});
return RTCRtpCapabilities(
codecs: codecs,
headerExtensions: headerExtensions,
fecMechanisms: fecMechanisms);
}