现在我有一个网站使用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。任何帮助?