开发者

Video Problem With jQuery UI Dialog

开发者 https://www.devze.com 2023-03-06 11:47 出处:网络
On my website, I\'m using a jQuery UI dialog box for some content, which includes video.However, one big problem.Whenever I close the dialog to reopen it (sometimes at the first run), the video downlo

On my website, I'm using a jQuery UI dialog box for some content, which includes video. However, one big problem. Whenever I close the dialog to reopen it (sometimes at the first run), the video downloads instead of plays.

Problems happen with all the players I tried (flowplayer, JW player, etc.). Either the aforementioned, or it doesn't load at all.

And I tried directly from the external page and it was fine, so it has to be a jQuery UI issue.

Is there a way around this? Anyone please? Thanks.

开发者_Go百科function openDialog(url) {
    $("<div class='popupDialog'>Loading...</div>")
        .dialog({
            autoOpen: false,
            closeOnEscape: true,
            width: '900',
            height: 'auto',
            modal: true,
            title: 'Bonus Features',
            autoResize: true,
            beforeClose: function(){   $(this).remove();   }
        }).bind('dialogclose', function() {
            jdialog.dialog('destroy');
        }).load(url, function() {
            $(this).dialog("option", "position", ['center', 'center'] ).bind('dialogopen', function() {
                    adjustJQueryDialogOverlay();
                });
                $(this).dialog("open");
        });
}

$(window).resize(function() {
    $(".ui-dialog-content").dialog("option", "position", ['center', 'center']);
});


use jquery nyromodal. it will solve all your video related problems.click to view nyromodal demo

0

精彩评论

暂无评论...
验证码 换一张
取 消