/**
* 播放视频的方法
*/
private void play() {
mp_video = new MediaPlayer();
AssetFileDescriptor afd = getResources().openRawResourceFd(R.raw.por);
try {
// 设置视频源
mp_video.setDataSource(afd.getFileDescriptor(),
afd.getStartOffset(), afd.getLength());
mp_video.setLooping(true);//设置循环
mp_video.setDisplay(sv_video.getHolder());
mp_video.prepareAsync();//异步
mp_video.setOnPreparedListener(this);
} catch (Exception e) {
e.printStackTrace();
}
}