为什么VideoView不播放路径中的文件
我在 Activity 上使用 VideoView 并录制视频(我检查了它是否存在于“/mnt/sdcard/DCIM/v110.3gp”上),当我在代码中尝试时
videoView.setVideoPath("/mnt/sdcard/DCIM/v110.3gp");
videoView.start();
没有任何反应。该文件存在,但 videoView 不想播放该文件。有什么问题吗?
I am using VideoView on Activity and I record video ( I checked it is on "/mnt/sdcard/DCIM/v110.3gp" exists) and when I try in code
videoView.setVideoPath("/mnt/sdcard/DCIM/v110.3gp");
videoView.start();
nothing happens. That file exists but videoView doesn't want to play that. What can be wrong ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能 100% 确定所有手机都使用 /mnt/sdcard 作为外部存储目录。请改用
Environment.getExternalStorageDirectory()
。You can't be 100% sure that all phones use /mnt/sdcard as the external storage directory. Use
Environment.getExternalStorageDirectory()
instead.