VeLivePlayerStatistics.fromMap constructor

VeLivePlayerStatistics.fromMap(
  1. Map map
)

Implementation

factory VeLivePlayerStatistics.fromMap(Map<dynamic, dynamic> map) {
  String? url = map['url'];
  bool? isHardWareDecode = map['isHardWareDecode'] ?? map['isHardwareDecode'];
  int? delayMs = map['delayMs'];
  int? stallTimeMs = map['stallTimeMs'];
  String? videoCodec = map['videoCodec'];
  int? width = map['width'];
  int? height = map['height'];
  double? fps = map['fps'];
  int? bitrate = map['bitrate'];
  int? videoBufferMs = map['videoBufferMs'];
  int? audioBufferMs = map['audioBufferMs'];
  VeLivePlayerFormat? format = (map['format'] as int).playerFormat;
  VeLivePlayerProtocol? protocol = (map['protocol'] as int).playerProtocol;
  return VeLivePlayerStatistics(
    url: url,
    isHardWareDecode: isHardWareDecode,
    delayMs: delayMs,
    stallTimeMs: stallTimeMs,
    videoCodec: videoCodec,
    width: width,
    height: height,
    fps: fps,
    bitrate: bitrate,
    videoBufferMs: videoBufferMs,
    audioBufferMs: audioBufferMs,
    format: format,
    protocol: protocol,
  );
}