webm不能在Android上播放

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11354708/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 07:08:37  来源:igfitidea点击:

webm not playing on Android

android

提问by Kevin Galligan

I was under the impression that webm played on Android, but I can't get the videos to play on my Galaxy Nexus. I haven't tried in the browser on the phone, just straight up and in the VideoView. Is there some magic combo of settings needed?

我的印象是 webm 在 Android 上播放,但我无法在我的 Galaxy Nexus 上播放视频。我还没有在手机上的浏览器中尝试过,直接在 VideoView 中尝试过。是否需要一些神奇的设置组合?

采纳答案by Ben Eggett

Yes, webm plays on android just fine. However, know that HTML5 video is always tricky.

是的,webm 在 android 上播放得很好。但是,要知道 HTML5 视频总是很棘手。

The best way to check is to simply load a webm file in your browser: http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm

检查的最佳方法是简单地在浏览器中加载 webm 文件:http: //clips.vorwaerts-gmbh.de/big_buck_bunny.webm

There a number of reasons why the video may not be playing for you including:

视频无法为您播放的原因有很多,包括:

  • The webm file may not have been encoded correctly
  • You are using a video playing application that does not handle webm files
  • Data integrity was lost when transferring it to your phone
  • There may be an issue with the current build of your OS (although if you are 2.2 or later there really shouldn't be)
  • webm 文件可能未正确编码
  • 您正在使用不处理 webm 文件的视频播放应用程序
  • 将数据传输到手机时丢失了数据完整性
  • 您的操作系统的当前版本可能存在问题(尽管如果您是 2.2 或更高版本,则确实不应该)

Play around with an html5 video generator to see which video formats are playing on your phone (webm and mp4 should) http://sandbox.thewikies.com/vfe-generator/

使用 html5 视频生成器查看您的手机上正在播放哪些视频格式(应该使用 webm 和 mp4)http://sandbox.thewikies.com/vfe-generator/

回答by Leo Nawroth

I did run in the same bug/problem while developing on my nexus4 (on huawei y300 and y303 phone it worked fine!). Switching to NuPlayer in the developer options fixed this. Apparently the deprecated AwesomePlayer can't play webm in my case.

我在我的 nexus4 上开发时确实遇到了同样的错误/问题(在 huawei y300 和 y303 手机上运行良好!)。在开发人员选项中切换到 NuPlayer 解决了这个问题。显然,在我的情况下,已弃用的 AwesomePlayer 无法播放 webm。

Nexus 4 Android version 5.1

Nexus 4 安卓 5.1 版

It's also talked about here: https://github.com/Floens/Clover/issues/2

这里也谈到了:https: //github.com/Floens/Clover/issues/2