2

オーディオ ベースの Web サイトの 1 つに Flowplayer を使用しています。今、プレイリスト クリップをロードし、次のコードを使用してすぐに再生しています。

function load_clips() {
    $.ajax({
        type : 'GET',
        url : 'category_details/playlistXml',
        dataType : "xml",
        success : function(response) {
            old_len = playlist_songs.length;
            $(response).find("song_details").each(function() {
                var song_name = "files/" + $(this).find("song_name").text();
                var song_id = $(this).find("song_id").text();
                var cat_id = $(this).find("category_id").text();
                var album_id = $(this).find("album_id").text();
                var category_id = $(this).find("category_id").text();
                playlist_songs.push({
                    url : song_name,
                    id : song_id,
                    cat_id : cat_id,
                    album_id:album_id,
                    category_id:category_id
                });
            });
            if (old_len == 0) {
                play_clip(0);
            }
  }
    });
}

そのため、再生機能を介して渡され、次のコードを使用してクリップを再生しています:

function play_clip(id) {
    flowplayer().play(playlist_songs[id]);
}

しかし、今、この機能を変更する必要があり、必要なのは、プレイリストをプレーヤーにロードする必要がありますが、プレーヤーの再生ボタンをクリックした後にのみ再生されます。私の実装は次の場所にあります

http://bit.ly/J6hIrO

誰かがいくつかの提案を与えることができれば、それは大きな助けになるでしょう

4

0 に答える 0