How to stop video playing in VideoView programmatically in android?

三世轮回 提交于 2019-11-27 07:36:30

问题


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.


回答1:


using this code u can stop videoplayer

videoView.stopPlayback();

For further ref link




回答2:


Try this

 videoView.stopPlayback();
 videoView.resume();



回答3:


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

if(null!=videoView){ 
videoView.stopPlayback();  
}


来源:https://stackoverflow.com/questions/9662390/how-to-stop-video-playing-in-videoview-programmatically-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!