我正在使用以下函数从“PlayListJSON.aspx”加载歌曲播放列表,但似乎有些错误,evrytime OnFailure 被调用,我无法进一步调试它。任何帮助都将是真正的 gr8。
Player.prototype.loadPlaylist = function(playlistId, play) {
req = new Ajax.Request('/PlaylistJSON.aspx?id=' + playlistId, {
method: 'GET',
onSuccess: function(transport, json) {
eval(transport.responseText);
player.setPlaylist(playlist.tracklist, playlist.title, playlistId);
player.firstTrack();
if (play) player.playSong();
},
onFailure: function() {
//error
}
});
}