'How to stop video playing in VideoView programmatically in android?
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.
Solution 1:[1]
Try this
videoView.stopPlayback();
videoView.resume();
Solution 2:[2]
First Check your video is available or not then stop this video.It's better for you
if(null!=videoView){ videoView.stopPlayback(); }
Solution 3:[3]
usually used when onBackPressed method like this
@Override
public void onBackPressed() {
if (videoView!=null)
videoView.stopPlayback();
else
super.onBackPressed();
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gowthaman M |
| Solution 2 | Md.Tarikul Islam |
| Solution 3 | zakaria abd al-salam alshamere |
