0

我们需要创建某些产品的视频演示。确保视频在所有流行平台上尽可能多的浏览器上播放的最佳方法是什么?

当前实现:我们只有在 Flash 播放器中加载的 Flash 视频。

4

3 回答 3

1

如果托管服务对您来说是一个可行的选择,Vimeo 和 Wistia 等网站的付费帐户将为桌面浏览器提供 Flash 视频,为智能手机和其他移动设备(如 iPad 和即将推出的三星、黑莓等平板电脑)提供 HTML5 视频。

如果您将自己进行所有托管,我建议您使用 HTML5 视频标签并简单地回退到 Flash。出色的VideoJS脚本为您处理大部分困难的事情,甚至允许您构建自定义嵌入代码

基本上,HTML 看起来像这样:

<video width="640" height="360" poster="poster.png" controls preload>
    <source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> <!-- This video file is for Safari, Chrome and smartphones running iOS and Android, it will also be referenced later in the Flash fallback for Internet Explorer -->
    <source src="video.ogv" type='video/ogg; codecs="theora, vorbis"' /> <!-- This video file is for Firefox, Opera, and is also supported by Chrome -->

    <object id="flash_fallback" width="640" height="360" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"> <!-- This calls on FlowPlayer, an excellent third party Flash video player -->
        <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
        <param name="allowfullscreen" value="true" />
        <param name="flashvars" value='config={"playlist":["poster.png", {"url": "video.mp4","autoPlay":false,"autoBuffering":true}]}' /> <!-- Notice here you're calling the same .mp4 file as above -->
        <img src="poster.png" width="640" height="360" alt="Poster Image" title="No video playback capabilities." /> <!-- If the browser can't handle any of the HTML5 video files and doesn't have Flash installed, they'll just get the poster frame as shown here -->
    </object>
</video>

希望这可以帮助!

于 2010-10-21T13:51:35.710 回答
0

在您的网站页面上使用可回退到 HTML5 版本的可嵌入视频播放器(例如,JWPlayer)。这样,您将在所有浏览器上使用 Flash 获得可预测/稳定的播放,并在支持它的设备(Android、iOS 等)上播放 HTML5。

于 2010-10-20T16:47:46.040 回答
0

Flash 将无法在任何 iOS 设备上播放。

编辑:我误读了这个问题。如果您使用 youtube 托管视频并嵌入 youtube 视频,则可以通过 youtube 应用在 iOS 设备上播放视频。那将是一种方法。

于 2010-10-20T12:44:24.390 回答