play method

Future<void> play()

Starts playing the video.

This method returns a future that completes as soon as the "play" command has been sent to the platform, not when playback itself is totally finished.

Implementation

Future<void> play() async {
  _throwIfNotInitialized('play');
  await vlcPlayerPlatform.play(_viewId);
  // This ensures that the correct playback speed is always applied when
  // playing back. This is necessary because we do not set playback speed
  // when paused.
  await setPlaybackSpeed(value.playbackSpeed);
}