0
String LINK = "my_url";
VideoView mVideoView = (VideoView) findViewById(R.id.videoview);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
mVideoView.setMediaController(mc);
mVideoView.setVideoURI(video);
mVideoView.start();
「http://benzeen.mn/media/a3638788-4a9f-4832-8861-cb9bae1b39e9/7c5961e5-a1bf-4f28-9aeb-2f70a0e79444.mp4」。該視頻網址未與VideoView一起播放。網頁瀏覽器可以成功播放此視頻。我寫了上面的代碼。此外我試圖使用(WebView),但它無法加載視頻。Android VideoView無法播放某些網址的視頻
setMediaPlaybackRequiresUserGesture()該方法失敗。我用API16 –
離開這個方法 –
我忽略了但它仍然不能播放 –