0

我在 jQuery 模式窗口中有一个 jPlayer 实例。它很好用,除了当我关闭窗口时播放器继续播放。我能够捕获窗口的关闭事件,但由于某种原因不能捕获播放器本身。任何帮助将不胜感激。这是我的一些代码:

//Modal Dialog
$(function () {
    var dHeight = $("#dialog-modal").data("mdheight"),
        dWidth = $("#dialog-modal").data("mdwidth");
    $("#dialog-modal").dialog({
        autoOpen: false,
        height: dHeight,
        width: dWidth,
        resizable: false,
        modal: true
    });
    $("#modal-opener").click(function () {
        $("#dialog-modal").dialog("open");
        return false;
    });
    //Capture dialog closing
    $("#dialog-modal").live("dialogclose", function (event) {
        $("#jquery_jplayer_1'").jPlayer("destroy");
    });
});

$(document).ready(function () {
    new jPlayerPlaylist({
        jPlayer: "#jquery_jplayer_1",
        cssSelectorAncestor: "#jp_container_1"
    }, [{
        title: "Amazing Grace",
        mp3: "AmazingGrace.mp3",
        oga: "AmazingGrace.ogg"
    }
    });
4

1 回答 1

0

我得到了它的工作,修复在另一个论坛上: https ://groups.google.com/forum/#!topic/jplayer/NSzSXe5nPbE

于 2012-07-27T11:39:21.497 回答