現在我有一個網站使用jPlayer在mp3上播放。我也希望能夠添加讓SoundCloud直接在播放器上播放的功能。如何將SoundCloud文件添加到jPlayer?
我知道這是可能的,因爲一個我喜歡的音樂博客hillydilly做到這一點。從看他們的代碼,我看到他們的jPlayer的設置有一些額外的參數,即sc和sclink。
$(".play-music").each(function(){
myPlaylist.add({
title: $(this).attr('data-title'),
artist: $(this).attr('data-artist'),
mp3: $(this).attr('data-mp3'),
url: $(this).attr('data-url'),
sc: $(this).attr('data-sc'),
sclink: $(this).attr('data-sclink')
});
});
我試圖尋找通過其代碼的休息,但無法弄清楚如何或在哪裏,他們實現SC和sclink。任何幫助?