UMediaTrack.fromMap constructor

UMediaTrack.fromMap(
  1. Map<Object?, Object?> map
)

Implementation

factory UMediaTrack.fromMap(Map<Object?, Object?> map) => UMediaTrack(
  id: (map["id"] as String?) ?? "",
  type: UMediaTrackType.values.firstWhere((UMediaTrackType t) => t.name == map["type"], orElse: () => UMediaTrackType.video),
  label: map["label"] as String?,
  language: map["language"] as String?,
  codec: map["codec"] as String?,
  bitrate: map["bitrate"] as int?,
  width: map["width"] as int?,
  height: map["height"] as int?,
  frameRate: (map["frameRate"] as num?)?.toDouble(),
  channels: map["channels"] as int?,
  sampleRate: map["sampleRate"] as int?,
  isDefault: map["isDefault"] == true,
  isForced: map["isForced"] == true,
  isSelected: map["isSelected"] == true,
  isAuto: map["isAuto"] == true,
);