VideoView视频播放
来源:互联网 发布:英文字体识别软件 编辑:程序博客网 时间:2024/09/21 09:03
Uri uri = Uri.parse(url); //网络视频
mVideoView = (VideoView) findViewById(R.id.videoView);
mVideoView.setMediaController(new MediaController(this)); //设置控制器,系统自带的控制器
mVideoView.setVideoURI(uri); //设置视频源
mVideoView.start();
//Call this to try to give focus to a specific view or to one of its descendants.
//称这个是试图把焦点集中在明确的view或者其子类中,请求焦点
@Override
public void onCompletion(MediaPlayer mp) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), "视频播放结束了", 1).show();
}
});
//Register a callback to be invoked when the end of a media file has been reached during playback.
//登记回调以便在media文件达到播放结束的时候调用。播放完成后调用,即监听播放完成
0 0
- Android VideoView播放视频
- VideoView播放视频
- Android VideoView播放视频
- 使用VideoView播放视频
- 播放视频-VideoView用法
- VideoView简单视频播放
- Android VideoView播放视频
- Android VideoView播放视频
- Android VideoView播放视频
- VideoView播放视频
- android videoview播放视频
- android---视频播放---VideoView
- 利用VideoView播放视频
- 使用VideoView播放视频
- videoview实现视频播放
- 利用VideoView播放视频
- 使用VideoView播放视频
- 使用VideoView播放视频
- Java 日期
- 本地RMI小例子。。。。
- Ubuntu 14.04 LTS 安装 MongoDB
- 云计算机芯片发布流程
- 继承后续
- VideoView视频播放
- phpstorm功能详解
- 复制粘贴有风险使用需谨慎
- Eclipse 常用快捷键
- UIButton常用小结
- tcp中级用法:局域网聊天室-多对1-带文件传输
- 从ecm 工具包的 helloworld 入门
- java 集合中祛除重复字符串的一个小笔记
- Java基础-集合框架之List