autoPause method

Future<void> autoPause()

Use this to programmatically pause the video.

Example - on visibility change.

Implementation

Future<void> autoPause() async {
  _isAutoPause = true;
  await _videoPlayerController!.pause();
}