Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how resume playback after stopPlayback? (Android)

Tags:

android

Continue this topic:

How to stop video playing in VideoView programmatically in android?

how resume playback after stopPlayback?

like image 499
ilw Avatar asked Dec 07 '22 02:12

ilw


1 Answers

To stop video

 // will stop and release the media player instance and move to idle state
 videoView.stopPlayback() 

To start new play

// fist set video path
videoView.setVideoPath("path"); // will release the previous media player instance if any
videoView.start() // will start if not in prepare/error state 

To pause the current playing

// pause the video
videoView.pause()  // will pause if already playing

Resume the video from current pause position

// resume the video
videoView.resume()  // will resume from the last paused state
like image 180
Libin Avatar answered Dec 10 '22 13:12

Libin