Android的 - 播放的MP4 [英] Android - Playing Mp4

查看:173
本文介绍了Android的 - 播放的MP4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打HTTP URL上的视频文件,在我的应用程序。这是为什么我的应用程序只能播放特定MP4文件(我试过512K的MP4,它的工作),并且不会玩一些别人?

I am trying to play video files from http urls in my app. Why is that my app plays only certain mp4 files (I tried 512k mp4 and it worked), and doesn't play some others?

下面是我的code中的片段:

Here's the snippet of my code:

    mVideoView.setVideoPath(myVideoURL);
    mVideoView.setMediaController(new MediaController(this));
    mVideoView.seekTo(currentPosition);
    mVideoView.requestFocus(); 

谢谢 克里斯

Thanks Chris

推荐答案

请确保你的MP4的不DRM'd,而且他们是宽度不超过320像素(videoView不能扩展到你)。您是否获得任何有用的错误LogCat中?

Make sure your mp4's aren't DRM'd, and that they're not wider than 320 pixels (videoView will not scale them for you). Are you getting any useful errors in LogCat?

这篇关于Android的 - 播放的MP4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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