无法播放此视频。由Android设备录制的Android videoView mp4 [英] Can't play this video. Android videoView mp4 recorded by android device

查看:755
本文介绍了无法播放此视频。由Android设备录制的Android videoView mp4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我' ve用其他格式寻找现有的潜在解决方案,那些仍然会回答上述错误。

I've looked for existing potential solutions with other formats and those still responds with mentioned error.

最后,记录了视频使用相同的设备,并将其用作此应用程序的资源,它仍然无法正常工作。

Finally, recorded the video with the same device and used it as a resource for this app and it still doesn't work.

设备: SGS2 ,lenovo a820

Devices: SGS2, lenovo a820

视频类型: MPEG-4视频(视频/ mp4 )

    videoView = (VideoView)findViewById(R.id.videoView);
    videoView.setVideoPath("android.resource://raw/sample.mp4");
    videoView.start();


推荐答案

看看我的下面代码是否正常...问题在pathe声明..

just see my below code it works...problem in pathe declaration..

 String uriPath = "android.resource://"+getPackageName()+"/"+R.raw.aha_hands_only_cpr_english;
        Uri uri = Uri.parse(uriPath);
        mVideoView.setVideoURI(uri);

多数民众赞成......

Thats it...

这篇关于无法播放此视频。由Android设备录制的Android videoView mp4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆