android视频播放器播放

private void play(long position)// 设置mediaPlayer播放视频

{

try {

mMediaPlayer.reset();

mMediaPlayer.setDataSource(mCurrentPath);

mMediaPlayer.setDisplay(mHolder);

mMediaPlayer.prepare();// 缓冲

mMediaPlayer.setOnPreparedListener(new PrepareListener(position));

} catch (Exception e) {

e.printStackTrace();

}

}


本文出自 “绝对领域” 博客,谢绝转载!

你可能感兴趣的:(视频)