AudioStream.fromJson constructor

AudioStream.fromJson(
  1. Map _json
)

Implementation

AudioStream.fromJson(core.Map _json)
    : this(
        bitrateBps: _json.containsKey('bitrateBps')
            ? _json['bitrateBps'] as core.int
            : null,
        channelCount: _json.containsKey('channelCount')
            ? _json['channelCount'] as core.int
            : null,
        channelLayout: _json.containsKey('channelLayout')
            ? (_json['channelLayout'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        codec:
            _json.containsKey('codec') ? _json['codec'] as core.String : null,
        mapping: _json.containsKey('mapping')
            ? (_json['mapping'] as core.List)
                .map<AudioAtom>((value) => AudioAtom.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        sampleRateHertz: _json.containsKey('sampleRateHertz')
            ? _json['sampleRateHertz'] as core.int
            : null,
      );