有没有办法,localhost设置播放视频,如: https://vjs.zencdn.net/v/oceans.mp4?
当我尝试访问我的视频时,它会自动下载
答案 0 :(得分:1)
使用视频观看
VideoView videoview = (VideoView) findViewById(R.id.VideoView);
MediaController mediacontroller = new MediaController("context");
mediacontroller.setAnchorView(videoview);
Uri video = Uri.parse("you_video_url");
videoview.setMediaController(mediacontroller);
videoview.setVideoURI(video);
在浏览器中播放视频
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://vjs.zencdn.net/v/oceans.mp4"));
startActivity(browserIntent);