IE 中的 jwPlayer 在显示滚动横幅时不会自动启动视频
我在使用著名的 jwPlayer 时遇到了问题。事实上,问题在于 IE(8 或 7)处理 Flash 播放器的方式。
他们的问题是:我有一个滚动横幅(使用 jquery 循环),在这个横幅中我有 2 个图像和一个视频。视频是使用jwPlayer驱动的。我期望横幅工作的方式是这样的:
- 在每个横幅上滚动
- 如果横幅是视频,则
以启动它。这是 javascript:
$('#slideshow')
.before('<div id="nav">')
.cycle({
fx: 'fade',
timeoutFn: calculateTimeout,
timeout: 20000,
pause: 1,
pager: '#nav'
});
function calculateTimeout(currElement, nextElement, opts, isForward) {
if ($(nextElement).attr("class") == "video-banner") {
return 20000;
} else {
return 8000;
}
我已将循环变量设置为 true,并将自动启动设置为 true,如您所见:
<div runat="server" id="video" class="video-banner">
<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->
<object id="Object1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" height="384" type="video/mp4">
<param name="movie" value="/uploads/Banner/Rainmaker.mp4" />
<param name="wmode" value="window" />
<param name="allowfullscreen" value="false" />
<param name="allowscriptaccess" value="always" />
<param name="loop" value="true" />
<param name="flashvars" value="file=/uploads/Banner/Durp.mp4&autostart=true" />
<embed
type="application/x-shockwave-flash"
id="player2"
name="player2"
src="/jwplayer/player.swf"
width="612"
height="384"
allowscriptaccess="always"
allowfullscreen="false"
autostart="true"
wmode="window"
loop="true"
flashvars="file=/uploads/Banner/Durp.mp4&autostart=true&"
/>
</object>
<!-- END OF THE PLAYER EMBEDDING -->
<img style="border-width: 0px;" src="/Uploads/Banner/banner.jpg">
</div>
在所有正常的浏览器中,当视频出现在横幅中时,他会自行启动。
有人可以帮助我让我在 IE(7 和 8)中执行与普通浏览器相同的行为吗?
I got a probleme with the famous jwPlayer. In fact the probleme is with the way IE (8 or 7) handle the flash player.
Their's the probleme: I got a rolling banner (using jquery cycle), in this banner i got 2 images an a video. The video is drive using jwPlayer. The way I expect the banner work is this:
- roll on each banner
- if the banner is the video start it.
This is the javascript:
$('#slideshow')
.before('<div id="nav">')
.cycle({
fx: 'fade',
timeoutFn: calculateTimeout,
timeout: 20000,
pause: 1,
pager: '#nav'
});
function calculateTimeout(currElement, nextElement, opts, isForward) {
if ($(nextElement).attr("class") == "video-banner") {
return 20000;
} else {
return 8000;
}
I have set the loop variable at true and the autostart at true either as you can see:
<div runat="server" id="video" class="video-banner">
<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->
<object id="Object1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" height="384" type="video/mp4">
<param name="movie" value="/uploads/Banner/Rainmaker.mp4" />
<param name="wmode" value="window" />
<param name="allowfullscreen" value="false" />
<param name="allowscriptaccess" value="always" />
<param name="loop" value="true" />
<param name="flashvars" value="file=/uploads/Banner/Durp.mp4&autostart=true" />
<embed
type="application/x-shockwave-flash"
id="player2"
name="player2"
src="/jwplayer/player.swf"
width="612"
height="384"
allowscriptaccess="always"
allowfullscreen="false"
autostart="true"
wmode="window"
loop="true"
flashvars="file=/uploads/Banner/Durp.mp4&autostart=true&"
/>
</object>
<!-- END OF THE PLAYER EMBEDDING -->
<img style="border-width: 0px;" src="/Uploads/Banner/banner.jpg">
</div>
In all normal browser, when the video come in the banner he start by himself.
Can someone help me to me make me doing the same behavior in IE (7 and 8) as in normal browser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该尝试 FlowPlayer
这是网站:http://flowplayer.org/
You should try FlowPlayer
Here is the website: http://flowplayer.org/