简体   繁体   English

什么是所有Android Webview版本的通用视频格式(和视频/音频流编码)

[英]What is a universal video format(and video/audio streaming codification) for all Android Webview versions

I have a web-view in an application and i use html5 tag. 我在应用程序中有一个Web视图,我使用html5标签。 I have had all kinds of issues on different android devices(samsung, sony, etc) with different android versions. 我在具有不同android版本的不同android设备(三星,索尼等)上遇到过各种问题。 Some could not play .mp4 and only played .m4v extensions. 有些无法播放.mp4,而只能播放.m4v扩展名。 Another old tablet could only play mp4. 另一台旧平板电脑只能播放mp4。 On an Xperia I had a special case. 在Xperia上,我有一个特殊情况。 The webview couldn't play the video in html and played it in another custom video view(although this didn't bother me at all). Web视图无法播放html中的视频,而无法在另一个自定义视频视图中播放(尽管这丝毫没有困扰我)。

I need the videos to autoplay as soon as i open the webview(and have managed to do it on those few videos that work), and i have end-video event handlers that have to fire at the right time. 我需要在打开Webview时自动播放视频(并设法在少数可用的视频上进行播放),并且我有必须在正确的时间触发的最终视频事件处理程序。

If anyone knows what video format + video and audio codification to use in order to have compatibility with all webviews on android please 如果有人知道要使用哪种视频格式+视频和音频编码以便与android上的所有webview兼容,请

可以与Android支持的视频编解码器一起使用的Android Webview和HTML5播放器(.mp4最适合渐进式视频,因为它迄今为止受最广泛的支持),并且还支持带Flash插件的.flv。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM