让 Facebox 等待 FLV 播放器加载
不完全确定如何做到这一点,但我注意到 Facebox 工作得很好,但是当我用它加载电影时,FLV 播放器、JWplayer 尚未完全加载,并且出现错误。所以我想在 Facebox 之前加载 JWplayer (FLV 播放器)。
Facebox 将此作为他们的嵌入代码。他们解释说你也可以在其中传递一个参数。
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
})
我的 FLV 播放器的嵌入代码是这样的:
var so = new SWFObject('/flash/playerTrans.swf','mpl','640px','360px','0');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('wmode','transparent');
so.addVariable('file', 'http://hometownquarterlyvideos.s3.amazonaws.com/whatishqchannel.flv');
so.addVariable('autostart','true');
so.addVariable('controlbar','none');
so.addVariable('repeat','always');
so.addVariable('image','/flash/video_girl/whatishqchannel.jpg');
so.addVariable('icons','false')
so.addVariable('screencolor','none');
so.addVariable('backcolor','FFFFFF');
so.addVariable('screenalpha','0');
so.addVariable('overstretch', 'true');
so.write('player');
我尝试将嵌入代码复制并粘贴到 Facebox 的 () 中。但我返回了语法错误。有什么想法吗?
Not entirely sure how to do this, but I noticed that Facebox works perfectly, but when I use it to load a movie, the FLV Player, JWplayer isn't fully loaded yet, and errors out. So I want to load JWplayer ( the FLV player ), before Facebox.
Facebox gives this as their embed code. And they explain that you can pass an argument in it as well.
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
})
My embed code for the FLV player is this :
var so = new SWFObject('/flash/playerTrans.swf','mpl','640px','360px','0');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('wmode','transparent');
so.addVariable('file', 'http://hometownquarterlyvideos.s3.amazonaws.com/whatishqchannel.flv');
so.addVariable('autostart','true');
so.addVariable('controlbar','none');
so.addVariable('repeat','always');
so.addVariable('image','/flash/video_girl/whatishqchannel.jpg');
so.addVariable('icons','false')
so.addVariable('screencolor','none');
so.addVariable('backcolor','FFFFFF');
so.addVariable('screenalpha','0');
so.addVariable('overstretch', 'true');
so.write('player');
I tried just copying and pasting the embed code into Facebox's (). But I got a syntax error returned. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道你是如何设置链接的,但这就是我的做法:
HTML(href 中的视频网址和 rel 中的视频图像)
脚本(未经测试)
I don't know how you have your links set up, but this is how I would do it:
HTML (video url in href and video image in rel)
Script (untested)