toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['videoWidth'] = videoWidth;
  data['videoHeight'] = videoHeight;
  data['videoBitrate'] = videoBitrate;
  data['videoFramerate'] = videoFramerate;
  data['videoGOP'] = videoGOP;
  data['backgroundColor'] = backgroundColor;
  if (backgroundImage != null) {
    data['backgroundImage'] = backgroundImage ?? "";
  }
  data['audioSampleRate'] = audioSampleRate;
  data['audioBitrate'] = audioBitrate;
  data['audioChannels'] = audioChannels;
  if (outputStreamId != null) {
    data['outputStreamId'] = outputStreamId ?? "";
  }
  if (mixStreams.isNotEmpty) {
    List<Map> mixStreamsDatas = <Map>[];
    for (var item in mixStreams) {
      mixStreamsDatas.add(item.toJson());
    }
    data['mixStreams'] = mixStreamsDatas;
  }
  return data;
}