现在我有一个网站,使用jPlayer来播放mp3.我还希望能够直接在播放器上添加SoundCloud流的功能.
我知道这是可能的,因为我最喜欢的音乐博客之一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')
});
});
Run Code Online (Sandbox Code Playgroud)
我试着查看其余代码,但无法弄清楚他们如何或在何处实现sc和sclink.有帮助吗?