ThaNativePlayerController.single constructor

ThaNativePlayerController.single(
  1. ThaMediaSource source, {
  2. bool autoPlay = true,
  3. bool loop = false,
  4. ThaPlaybackOptions playbackOptions = const ThaPlaybackOptions(),
})

Create a controller with a single media item.

Implementation

ThaNativePlayerController.single(
  ThaMediaSource source, {
  this.autoPlay = true,
  this.loop = false,
  this.playbackOptions = const ThaPlaybackOptions(),
}) : playlist = [source],
     _controllerId = _nextControllerId++ {
  _wasPlaying = autoPlay;
}