开发者

Android VideoView "Video cannot be played" works in Gallery

开发者 https://www.devze.com 2023-04-03 19:51 出处:网络
I receive an error when trying to play a large m4v file in my Android application. \"Sorry, this video cannot be played\"

I receive an error when trying to play a large m4v file in my Android application. "Sorry, this video cannot be played" The VideoView's onError handler gets called like: onError(MediaP开发者_开发百科layer mp, int what, int extra)

With "what" being 1 and "extra" being -2147483648

The exact same video plays without issues in the Gallery application.


As far as I know, android support mp4 but not m4v, asked and answered here


have you set the permission to read the internal storage???

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>

do this and it should work

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号