MediaPlayer mediaPlayer = new MediaPlayer();

mediaPlayer.reset();//重置为初始状态

mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

mediaPlayer.setDisplay(surfaceView.getHolder());//设置画面显示为surfaceView

mediaPlayer.setDataSource("/mnt/sdcard/oppo.mp4");

mediaPlayer.prepare();

mediaPlayer.start();//播放

mediaPlayer.pause();//暂停播放

mediaPlayer.start();//恢复播放

mediaPlayer.stop();//停止播放

mediaPlayer.release();//释放资源

05-28 20:05