使用bootstrap弹窗播放视频

来源:互联网 发布:桌面 滚动屏软件 编辑:程序博客网 时间:2024/04/28 02:56
使用腾讯


var html  = '<div id="video_content" style="height:400px;">';

    html += '<embed wmode="window" flashvars="vid=m03139rl3n1&amp;autoplay=1&amp;volume=50&amp;searchbar=0&amp;showcfg=1

&amp;showend=0&amp;openbc=0&amp;list=2&amp;pay=0&amp;shownext=0&amp;share=1&amp;bullet=0&amp;theater=1

&amp;skin=http://imgcache.qq.com/minivideo_v1/vd/res/skins/TencentPlayerSkinV5.swf&amp;switch2h5=0&amp;bulletinput=0

&amp;attstart=&amp;defnpayver=1&amp;fakefull=1&amp;title=方法介绍&amp;columnId=" src="//imgcache.qq.com/tencentvideo_v1/

playerv3/TencentPlayer.swf?max_age=86400&amp;v=1468398955873" quality="high" name="75f0b74c410b8fb7c44db954f187c269" id="75f0b74c410b8fb7c44db954f187c269" bgcolor="#000000" width="100%" height="100%" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/cn/flashplayer/">';

    html += '</div>';


BootstrapDialog.show({
    title: '<span style="font-weight:bold;">标题</span>',
    message: html,
    type: BootstrapDialog.TYPE_DEFAULT,
    cssClass: 'modal-dialog-wd dialog-top',
    buttons: [{
        icon: 'glyphicon glyphicon-send',
        label: '确定',
        cssClass: 'btn-primary',
        autospin: true,
        action: function(dialogRef){
            dialogRef.enableButtons(false);
            dialogRef.setClosable(false);
            setTimeout(function(){
                dialogRef.close();

                // 执行处理函数

            }, 2000);
        }
    }, {
        label: '关闭',
        action: function(dialogRef){
            dialogRef.close();
        }
    }]


});


使用优酷

var html  = '<div id="video_content">';
            html += '<iframe id="video_iframe" src="http://yuntv.letv.com/bcloud.html?uu=b80ef7a288&vu=38b8137c77&auto_play=1&gpcflag=1&width=752&height=426" style="border:0px;width:752px;height:426px;">';
            html += '</iframe>';
            html += '</div>';

        BootstrapDialog.show({
            title: '<span style="font-weight:bold;">介绍视频</span>',
            message: html,
            type: BootstrapDialog.TYPE_DEFAULT,
            cssClass: 'modal-dialog-wd dialog-top',
            buttons: [{
                icon: 'glyphicon glyphicon-send',
                label: '确定',
                cssClass: 'btn-primary',
                autospin: true,
                action: function(dialogRef){
                    dialogRef.enableButtons(false);
                    dialogRef.setClosable(false);
                    setTimeout(function(){
                        dialogRef.close();

                        // 处理函数

                    }, 2000);
                }
            }, {
                label: '关闭',
                action: function(dialogRef){
                    dialogRef.close();
                }
            }]


        });
0 0