V2TimSoundElem.fromJson constructor

V2TimSoundElem.fromJson(
  1. Map json
)

Implementation

V2TimSoundElem.fromJson(Map json) {
  elemType = MessageElemType.V2TIM_ELEM_TYPE_SOUND;
  json = Utils.formatJson(json);
  path = json['sound_elem_file_path'];
  UUID = json['sound_elem_file_id'];
  dataSize = json['sound_elem_file_size'];
  duration = json['sound_elem_file_time'];
  localUrl = getDefaultLocalUrl();
  url = json['sound_elem_url'];
  if (json['nextElem'] != null) {
    nextElem = Utils.formatJson(json['nextElem']);
  }
}