Html html5 视频是否支持在手机(symbian、android、iphone)上开箱即用的 flv?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3067016/
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-29 03:30:36  来源:igfitidea点击:

Does html5 video support flv out of the box on mobile phones(symbian,android,iphone)?

flashhtmlmobile-phoneshtml5-video

提问by wamp

The purpose is to support playing flv without requiring client side script like actionscript.

目的是支持播放 flv 而不需要像 actionscript 这样的客户端脚本。

Anyone knows?

有谁知道?

回答by typeoneerror

HTML5 video support is lacking at best currently. Many browser vendors each use different codecs (Safari/MS use H.264, Firefox Opera use Ogg/Theora). None of the browsers support the .FLV format to display video. .FLV and .F4V are the Flash Player's format. HTML5's primary intention is to reduce the need for plugins, so Flash Video is not part of the spec. To answer your question though: it depends on the mobile browser's implementation of the HTML5 specification and their selection of codec.

目前充其量缺乏对 HTML5 视频的支持。许多浏览器供应商各自使用不同的编解码器(Safari/MS 使用 H.264,Firefox Opera 使用 Ogg/Theora)。没有任何浏览器支持 .FLV 格式来显示视频。.FLV 和 .F4V 是 Fl​​ash Player 的格式。HTML5 的主要目的是减少对插件的需求,因此 Flash Video 不是规范的一部分。不过要回答您的问题:这取决于移动浏览器对 HTML5 规范的实现及其对编解码器的选择。

回答by Abdulsalm

This code doesn't work.. video tag doesn't support flv ext

此代码不起作用.. 视频标签不支持 flv ext

<video>
    <source src"yourFile.flv" type="video/flv">
</video>

回答by svarlitskiy

I'm not sure if this helps or not. But I've found that if the client has DIVX PLUS WEB PLAYER (free to download) installed, it plays many of the video extensions and they are all specified the same way. Below is a sample of the code that worked.

我不确定这是否有帮助。但是我发现如果客户端安装了 DIVX PLUS WEB PLAYER(免费下载),它会播放许多视频扩展,并且它们都以相同的方式指定。下面是一个有效的代码示例。

LINK: http://www.divx.com/en/software/divx-plus/web-player

链接:http: //www.divx.com/en/software/divx-plus/web-player

<head>
    <!-- WEBSITE INFORMATION -->
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta name="description" content="DESC" />
    <meta name="keywords" content="KEYS" />

    <!-- STYLE SHEET LINKS -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/mycss.css" />
    <link rel="shortcut icon" href="images/myIcon.ico" />

    <!-- SCRIPT TO LOAD WEBSITE -->
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript" src="js/jquery-1.7.js"></script>
    <script type="text/javascript" src="js/myjs.js"></script>

    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
</head>
<body>
<video width="320" height="240" controls="controls">
  <source src="http://www.myweb.com/video.flv" type="video/mp4" />
  <source src="http://www.myweb.com/video.mp4" type="video/mp4" />
  <source src="http://www.myweb.com/video.avi" type="video/mp4" />
  Your browser does not support the video tag.
</video>
</body>

Check it out for yourselves, maybe I've just been lucky or something. But this has worked for me in the past. I don't know why, I cannot explain it, I just know it worked.

自己检查一下,也许我只是运气好或什么的。但这在过去对我有用。我不知道为什么,我无法解释它,我只知道它有效。

回答by Paul D. Waite

Nope.

不。

I'm not sure if any phones support FLV at all yet. It's only really really recent Android phones that support Flash at all I think?

我不确定是否有任何手机支持 FLV。我认为只有真正支持 Flash 的 Android 手机才是真正的最新款吗?

回答by Haspemulator

I can say for sure that default browsers for phones running Symbian S60 5th ed., WInMobile up to 6.5, Android up to 2.1 does not support HTML5.

我可以肯定地说,运行 Symbian S60 第 5 版、WInMobile 最高 6.5、Android 最高 2.1 的手机的默认浏览器不支持 HTML5。

回答by Sunday Ironfoot

FLV is a Flash video format (or is it a container), and has nothing to do with HTML5. While a video format for HTML5 hasn't been agreed on, currently browsers support H.264 and Ogg Theora with Google recently open-sourcing the VP8 codec and packaging it up into the WebM container. Technically a browser could support flv via the HTML5 <video>element, but that's never going to happen. Browser support is thus:

FLV是Flash视频格式(或者说是容器),与HTML5无关。虽然尚未就 HTML5 的视频格式达成一致,但目前浏览器支持 H.264 和 Ogg Theora,谷歌最近开源了 VP8 编解码器并将其打包到 WebM 容器中。从技术上讲,浏览器可以通过 HTML5<video>元素支持 flv ,但这永远不会发生。浏览器支持因此:

  • Firefox 3.6 - Ogg Theora
  • Firefox 4.0 - Ogg Theora + WebM
  • Chrome 5.0 - H.264 + Ogg Theora (WebM coming soon)
  • Safari 4/5 - H.264
  • Opera 10.5 - Ogg Theora (I believe WebM coming soon)
  • IE9 - H.264 (supports WebM if installed by the user)
  • Firefox 3.6 - Ogg Theora
  • Firefox 4.0 - Ogg Theora + WebM
  • Chrome 5.0 - H.264 + Ogg Theora(WebM 即将推出)
  • Safari 4/5 - H.264
  • Opera 10.5 - Ogg Theora(我相信 WebM 即将推出)
  • IE9 - H.264(如果用户安装,则支持 WebM)

To answer your question, if you want to play .flv videos then you're stuck using Flash I'm afraid. If you want to take advantage of HTML5 video now it is possible to create an HTML5 video player that degrades to Flash support if the user doesn't have an HTML5 browser. It would mean converting your videos into H.264 and/or Ogg Theora, as well as keeping the flv ones handy, so you could potentially end up having to deal with multiple video files in different formats taking up drive space.

为了回答您的问题,如果您想播放 .flv 视频,恐怕您只能使用 Flash。如果您现在想利用 HTML5 视频,可以创建一个 HTML5 视频播放器,如果用户没有 HTML5 浏览器,该播放器将降级为 Flash 支持。这意味着将您的视频转换为 H.264 和/或 Ogg Theora,以及保持 flv 的方便,因此您可能最终不得不处理占用驱动器空间的不同格式的多个视频文件。

EDIT:I noticed you're referring to mobile phones, rather than desktop browsers, what I know is that Safari on iPhone supports H.264, Android supports H.264 (I'm sure WebM will make an appearance on Android devices), Windows Mobile 7 will likely support H.264. I'm not sure about the rest.

编辑:我注意到你指的是手机,而不是桌面浏览器,我知道 iPhone 上的 Safari 支持 H.264,Android 支持 H.264(我确定 WebM 会出现在 Android 设备上), Windows Mobile 7 可能会支持 H.264。我不确定其余的。