toMap method
Implementation
Map<String, dynamic> toMap() {
var headerExtensionsList = <dynamic>[];
headerExtensions?.forEach((params) {
headerExtensionsList.add(params.toMap());
});
var encodingList = <dynamic>[];
encodings?.forEach((params) {
encodingList.add(params.toMap());
});
var codecsList = <dynamic>[];
codecs?.forEach((params) {
codecsList.add(params.toMap());
});
return {
'transactionId': transactionId,
if (rtcp != null) 'rtcp': rtcp!.toMap(),
'headerExtensions': headerExtensionsList,
'encodings': encodingList,
'codecs': codecsList,
if (degradationPreference != null)
'degradationPreference':
typeRTCDegradationPreferenceString[degradationPreference!],
};
}