4

这是自 JW 播放器 6.0 到 Flash 最新版本以来版本的严重错误。自 6.0 版发布以来,有人报告了此错误,但他们的支持从未修复此错误。

很难解释该错误的行为,请在播放视频后点击播放按钮并将鼠标悬停在时间轴上以查看缩略图工具提示的行为

知道如何解决吗?

4

1 回答 1

0

首先,我们应该让 jwplayer 的 javascript 来构建 html 代码。

用js初始化jwplayer,在html中使用html5视频,如下:

<center>            
    <video controls="controls" id="container" poster="http://www.example.com/yourvideothumbs/videothumb.jpg"  width="693" height="388">
            <source src="http://www.example.com/videos/jourvideo.mp4" type="video/mp4" />
    </video>                        
</center>

Javascript:

if(navigator.userAgent.toLowerCase().match(/(android)/) || navigator.userAgent.toLowerCase().match(/(chrom)/) ){
    //wee must force flash video player in chrome, because mp4 video files is not supported yet in chrome's HTML5 video implementation.
    modes = [{type: 'flash', src:  '[JWPLAYERBASEDIR]/swf/player.swf'}];
}else{
    modes = [ {type: 'html5'},{type: 'flash', src:  '[JWPLAYERBASEDIR]swf/player.swf'}];
}

jwplayer("container").setup({                   
    'modes':modes,      
}); 

这在所有浏览器中都对我有用。jwplayer 可以符合 HTML5 是否支持。

或者下面的强制 HTML4 实现:

<div id="container"></div>
<script type="text/javascript">
    jwplayer("container").setup({
       modes = [{type: 'flash', src:  '[JWPLAYERBASEDIR]/swf/player.swf'}], //force flashplayer for video
       image: "yourvideothumbs/videothumb.jpg", //poster image
       file: "videos/jourvideo.mp4",  //video file 
       height: "693", //set height in px
       width: "388" //set width in px
   });

在设置中,您可以设置皮肤、控件、自动启动任何您想要的东西:http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player/

于 2013-12-26T05:19:46.517 回答