M3u8Settings.fromJson constructor

M3u8Settings.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory M3u8Settings.fromJson(Map<String, dynamic> json) {
  return M3u8Settings(
    audioDuration: (json['audioDuration'] as String?)?.toM3u8AudioDuration(),
    audioFramesPerPes: json['audioFramesPerPes'] as int?,
    audioPids: (json['audioPids'] as List?)
        ?.whereNotNull()
        .map((e) => e as int)
        .toList(),
    nielsenId3: (json['nielsenId3'] as String?)?.toM3u8NielsenId3(),
    patInterval: json['patInterval'] as int?,
    pcrControl: (json['pcrControl'] as String?)?.toM3u8PcrControl(),
    pcrPid: json['pcrPid'] as int?,
    pmtInterval: json['pmtInterval'] as int?,
    pmtPid: json['pmtPid'] as int?,
    privateMetadataPid: json['privateMetadataPid'] as int?,
    programNumber: json['programNumber'] as int?,
    scte35Pid: json['scte35Pid'] as int?,
    scte35Source: (json['scte35Source'] as String?)?.toM3u8Scte35Source(),
    timedMetadata: (json['timedMetadata'] as String?)?.toTimedMetadata(),
    timedMetadataPid: json['timedMetadataPid'] as int?,
    transportStreamId: json['transportStreamId'] as int?,
    videoPid: json['videoPid'] as int?,
  );
}