usePlayer method

dynamic usePlayer(
  1. PlayerController? controller
)

Implementation

usePlayer(PlayerController? controller) {
  _subscriptions.addAll([
    controller?.streams.playing.listen(onPlayingChanged),
    controller?.streams.position.listen(onPositionChanged),
    controller?.streams.duration.listen(onDurationChanged),
    controller?.streams.status.listen(onStatusChanged),
    controller?.streams.speed.listen(onSpeedChanged),
    controller?.streams.volume.listen(onVolumeChanged),
    controller?.streams.loop.listen(onLoopChanged),
    controller?.streams.events.listen(onEvent),
  ]);
}