RCRTCRemoteUser.fromJson constructor

RCRTCRemoteUser.fromJson(
  1. Map<String, dynamic> jsonObj
)

Implementation

RCRTCRemoteUser.fromJson(Map<String, dynamic> jsonObj) : super.fromJson(jsonObj) {
  List<dynamic> jsonStreamList = jsonObj['streamList'];
  for (var stream in jsonStreamList) {
    if (stream['type'] == 0) {
      streamList.add(RCRTCAudioInputStream.fromJson(stream));
    } else {
      streamList.add(RCRTCVideoInputStream.fromJson(stream));
    }
  }
}