stream property

PlayerStream stream
getter/setter pair

Current state of the player available as listenable Streams.

Implementation

late PlayerStream stream = PlayerStream(
  playingController.stream
      .distinct((previous, current) => previous == current),
  positionController.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) => const ListEquality().equals(previous, current)),
  bufferingController.stream
      .distinct((previous, current) => previous == current),
  bufferController.stream
      .distinct((previous, current) => previous == current),
  durationController.stream
      .distinct((previous, current) => previous == current),
  // playlistController.stream.distinct((previous, current) => ListEquality().equals(previous, current)),
  volumeController.stream
      .distinct((previous, current) => previous == current),
  rateController.stream.distinct((previous, current) => previous == current),
  completedController.stream
      .distinct((previous, current) => previous == current),
);