// 视频
VideoView videoView = new VideoView;
videoView.setVideoURI(Uri.parse("android.resource://" + this.getPackageName() + "/raw/" + R.raw.video));
// 音频
MediaPlayer media = MediaPlayer.create(this, R.raw.music);
Android Studio 从项目内获取视频音频对象
最新推荐文章于 2024-07-08 02:29:27 发布