swfobject 无法在 Internet Explorer 中正确加载 blip.tv swf

发布于 2024-11-05 00:59:04 字数 1186 浏览 2 评论 0原文

我正在使用 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

谢谢!

I'm using swfobject (2.2) to load blip.tv videos. Everything was working fine with their old player, but now that they have switched to the stratos player, it fails to load properly in IE. It shows a grey video window, with the play button half showing on the left side, and the button won't work.

Here is my js code:

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);
}

The file that I pass to the loadBlip function looks like: "http://blip.tv/rss/flash/3403588".

Again, this works fine in FF/Chrome/Safari, but fails in IE.

Here's a sample link: http://bit.ly/k6pdae

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

落花浅忆 2024-11-12 00:59:04

我能够通过将时间戳添加到 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);

当没有包含视频的 div 的 css 隐藏/取消隐藏时,这可以修复它。某些页面隐藏/取消隐藏视频,这些页面呈现出相同的原始问题。到达那里...有什么建议吗?

I was able to figure out the caching part, by adding the time stamp to the swf, and to the filename:

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);

This fixes it when there's no css hiding/unhiding of the div that contains the video. Some pages hide/unhide the videos, and these are exhibiting the same original problems. Getting there...any suggestions?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文