android VideoView增加缓冲
我编写了一个视频播放器,可以播放网站上的视频。我的视频播放器实际上是来自 android 的 VideoView 小工具。
当我在 wifi 网络上时,视频可以正常播放,如果我按预期切换到 3G,情况就不一样了:D。我想要的是增加流缓冲区,似乎 VideoView 将视频流传输至剪辑大小的 8%。
当我按下播放按钮时,流媒体仍在播放,但它保持了百分比距离...如果我按下暂停,流媒体就会停止..
我可以增加流媒体长度并使视频流在暂停时播放吗?
谢谢你!
I have writen a video player that plays videos from a website. My videoplayer is actualy the VideoView gadget from android.
The videos are playing ok when I am on the wifi network, the things are not the same if I switch to 3G as expected :D. What I want is to increase the streaming buffer, it seems that VideoView is streaming the video up to 8% of the clip size.
When I press the play button, the streaming its still coming but it keeps that percentage distance... and if I press pause, the streaming is stopping..
Can I increase the streaming length and make the video streaming while in pause?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以自己将流读取到本地文件并将 VideoView 指向该文件。我不确定你可以存储多少。另外,VideoView 能否对所指向的文件的固定大小做出良好的反应。您可以创建正确大小的文件,但是您必须确保读取的视频不会超出您缓存的点。
You could possibly read the stream yourself to a local file and point the VideoView to that. I'm not sure however how much you're allowed to store. Also, will the VideoView react well the fixed size of the file as it was pointed to. You could possibly create the file in correct size, but then you will have to make sure that video is not read beyond the point you have cached.