我正在使用swfobject(2.2)加载blip.tv视频。一切都与他们的老玩家一起工作正常,但现在他们已经切换到stratos播放器,它无法在IE中正确加载。它显示一个灰色的视频窗口,左侧显示播放按钮一半,按钮不起作用。
这是我的js代码:
function loadBlip(videoFile,width,height,cssID) {
var blipSWF = "http://blip.tv/scripts/flash/stratos.swf";
var expressSWF = "/lib/js/swfobject/expressInstall.swf";
var attributes = {
name: cssID,
id: cssID
};
var flashvars = {
file: videoFile,
allowsriptaccess: "true",
expressinstall: expressSWF,
allowfullscreem: "true",
enablejs: "true",
javascriptid: cssID,
lightcolor: "0xFFFFFF",
backcolor: "0x000000",
autostart: "false",
showinfo: "false"
};
var params = {
wmode: "opaque",
allowfullscreen: "true",
allowScriptAccess: "always"
};
swfobject.embedSWF(blipSWF, cssID, width, height, "9.0.124", false, flashvars, params, attributes);
}
我传递给loadBlip函数的文件如下:“http://blip.tv/rss/flash/3403588”。
同样,这在FF / Chrome / Safari中运行良好,但在IE中失败。
以下是一个示例链接:http://bit.ly/k6pdae
谢谢!
答案 0 :(得分:0)
我能够通过在swf和文件名中添加时间戳来找出缓存部分:
function loadBlip(videoFile,width,height,cssID) {
var stampStr = "?t=" + new Date().getTime();
var blipSWF = "http://blip.tv/scripts/flash/stratos.swf" + stampStr;
var expressSWF = "/lib/js/swfobject/expressInstall.swf";
var attributes = {
};
var flashvars = {
file: videoFile + stampStr,
allowsriptaccess: "true",
enablejs: "true",
allowfullscreen: "true",
enablejs: "true",
javascriptid: cssID,
lightcolor: "0xFFFFFF",
backcolor: "0x000000",
autostart: "false",
showinfo: "false"
};
var params = {
allowfullscreen: "true",
allowScriptAccess: "always"
};
swfobject.embedSWF(blipSWF, cssID, width, height, "9.0.124", expressSWF, flashvars, params, attributes);
当没有css隐藏/取消隐藏包含视频的div时,它会修复它。有些页面隐藏/取消隐藏视频,这些都表现出相同的原始问题。到那儿......有什么建议吗?