javascript:有没有办法通过javascript嵌入blip.tv视频?

时间:2010-11-24 00:02:00

标签: javascript mootools

是否可以通过javascript嵌入视频,例如vimeo& moogaloop,但是对于blip.tv?

他们的文件似乎不清楚如何做,他们没有例子,我用谷歌搜索大约40分钟找不到..

谢谢,S。

1 个答案:

答案 0 :(得分:1)

我终于找到了我想要做的解决方案。如果有人对此感兴趣,那么它是:(我正在使用mootools)

function blipEmbed(episodeId) {
    var swf_id = 'embeddedPlayer';
    var moogaloop = new Swiff('http://blip.tv/scripts/flash/stratos.swf', {
        id : swf_id,
        container : 'playerHolder', /* the container's id where the swf will be embedded, i used a div */
        fullScreen: true,
        width : 1000,
        height : 500,
        vars : {
            file: "http://blip.tv/file/"+episodeId+"?skin=rss", 
            autostart: true, 
            allowm4v: true,
            showstrands: false,
            showguidebutton: false,
            showplaylist: false,
            showsharebutton: false,
            showmorebutton: false,
            showfsbutton: false,
            removebrandlink: true,
            showinfo: false,
            useoldendcap: false,
            enablejs: true
        }
    });

}

/* and for the callback, blip forces you to use this function*/

function getUpdate(changeType, param1, param2){
    if (changeType=="complete") {
        // when the video is done playing, do something
    }
}