stream property

PlayerStream stream
getter/setter pair

Current state of the player available as listenable Streams.

Implementation

late PlayerStream stream = PlayerStream(
  playlistController.stream.distinct(
    (previous, current) => previous == current,
  ),
  playingController.stream.distinct(
    (previous, current) => previous == current,
  ),
  completedController.stream.distinct(
    (previous, current) => previous == current,
  ),
  positionController.stream.distinct(
    (previous, current) => previous == current,
  ),
  durationController.stream.distinct(
    (previous, current) => previous == current,
  ),
  volumeController.stream.distinct(
    (previous, current) => previous == current,
  ),
  rateController.stream.distinct(
    (previous, current) => previous == current,
  ),
  pitchController.stream.distinct(
    (previous, current) => previous == current,
  ),
  bufferingController.stream.distinct(
    (previous, current) => previous == current,
  ),
  bufferController.stream.distinct(
    (previous, current) => previous == current,
  ),
  playlistModeController.stream.distinct(
    (previous, current) => previous == current,
  ),
  /* AUDIO-PARAMS STREAM SHOULD NOT BE DISTINCT */
  audioParamsController.stream,
  /* VIDEO-PARAMS STREAM SHOULD NOT BE DISTINCT */
  videoParamsController.stream,
  audioBitrateController.stream.distinct(
    (previous, current) => previous == current,
  ),
  audioDeviceController.stream.distinct(
    (previous, current) => previous == current,
  ),
  audioDevicesController.stream.distinct(
    (previous, current) => ListEquality().equals(previous, current),
  ),
  trackController.stream.distinct(
    (previous, current) => previous == current,
  ),
  tracksController.stream.distinct(
    (previous, current) => previous == current,
  ),
  widthController.stream.distinct(
    (previous, current) => previous == current,
  ),
  heightController.stream.distinct(
    (previous, current) => previous == current,
  ),
  subtitleController.stream.distinct(
    (previous, current) => ListEquality().equals(previous, current),
  ),
  logController.stream.distinct(
    (previous, current) => previous == current,
  ),
  /* ERROR STREAM SHOULD NOT BE DISTINCT */
  errorController.stream,
);