因此,我将视频从 URL 流式传输到 androids 视频视图及其 MP4 中。
这是我的代码:
String LINK = "String LINK = "http://www.fieldandrurallife.tv/videos/Benltey%20Mulsanne.mp4";
setContentView(R.layout.video);
VideoView videoView =(VideoView)findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.requestFocus();
videoView.start();";
我收到对话框说“无法播放此视频”但是如果我将链接网址更改为“ http://www.boisestatefootball.com/sites/default/files/videos/original/01%20-%20coach%20pete %20bio_4.mp4 " 然后就可以了!有谁知道为什么?我该如何解决?
非常感谢