PlayerStreamInfo

The detailed information of the media stream.

class PlayerStreamInfo {
  const PlayerStreamInfo(
      {this.streamIndex,
      this.streamType,
      this.codecName,
      this.language,
      this.videoFrameRate,
      this.videoBitRate,
      this.videoWidth,
      this.videoHeight,
      this.videoRotation,
      this.audioSampleRate,
      this.audioChannels,
      this.audioBitsPerSample,
      this.duration});

  @JsonKey(name: 'streamIndex')
  final int? streamIndex;
  @JsonKey(name: 'streamType')
  final MediaStreamType? streamType;
  @JsonKey(name: 'codecName')
  final String? codecName;
  @JsonKey(name: 'language')
  final String? language;
  @JsonKey(name: 'videoFrameRate')
  final int? videoFrameRate;
  @JsonKey(name: 'videoBitRate')
  final int? videoBitRate;
  @JsonKey(name: 'videoWidth')
  final int? videoWidth;
  @JsonKey(name: 'videoHeight')
  final int? videoHeight;
  @JsonKey(name: 'videoRotation')
  final int? videoRotation;
  @JsonKey(name: 'audioSampleRate')
  final int? audioSampleRate;
  @JsonKey(name: 'audioChannels')
  final int? audioChannels;
  @JsonKey(name: 'audioBitsPerSample')
  final int? audioBitsPerSample;
  @JsonKey(name: 'duration')
  final int? duration;
  factory PlayerStreamInfo.fromJson(Map<String, dynamic> json) =>
      _$PlayerStreamInfoFromJson(json);
  Map<String, dynamic> toJson() => _$PlayerStreamInfoToJson(this);
}

Attributes

streamIndex
The index of the media stream.
streamType
The type of the media stream. See MediaStreamType.
codecName
The codec of the media stream.
language
The language of the media stream.
videoFrameRate
This parameter only takes effect for video streams, and indicates the video frame rate (fps).
videoBitrate
This parameter only takes effect for video streams, and indicates the video bitrate (bps).
videoWidth
This parameter only takes effect for video streams, and indicates the video width (pixel).
videoHeight
This parameter only takes effect for video streams, and indicates the video height (pixel).
videoRotation
This parameter only takes effect for video streams, and indicates the video rotation angle.
audioSampleRate
This parameter only takes effect for audio streams, and indicates the audio sample rate (Hz).
audioChannels
This parameter only takes effect for audio streams, and indicates the audio channel number.
audioBitsPerSample
This parameter only takes effect for audio streams, and indicates the bit number of each audio sample.
duration
The total duration (ms) of the media stream.