18

I am using VideoView for playing video,I would like to stop the playing video completely.Please help me on this for solving it.Thanks.

kaiz.net
  • 1,984
  • 3
  • 23
  • 31
Karthik
  • 4,943
  • 19
  • 53
  • 86

4 Answers4

40

using this code u can stop videoplayer

videoView.stopPlayback();

For further ref link

Parag Chauhan
  • 35,760
  • 13
  • 86
  • 95
1

Try this

 videoView.stopPlayback();
 videoView.resume();
Gowthaman M
  • 8,057
  • 8
  • 35
  • 54
AnAIDE
  • 21
  • 2
0

First Check your video is available or not then stop this video.It's better for you

if(null!=videoView){ 
videoView.stopPlayback();  
}
Md.Tarikul Islam
  • 1,241
  • 1
  • 14
  • 16
0

usually used when onBackPressed method like this

@Override
    public void onBackPressed() { 
        if (videoView!=null) 
            videoView.stopPlayback(); 
        else
            super.onBackPressed();
    }