Last active
December 11, 2015 01:49
-
-
Save hustKiwi/4525920 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.utils.api('baidu.ting.song.play', { | |
songid: sid | |
}, { | |
expires: 0 | |
}).done(function(r) { | |
self._curSong = r; | |
self.setUrl(r.bitrate.file_link); | |
self.trigger('player:fetch', r); | |
}).fail(function(r) { | |
// TODO: server返回错误,之后要记录日志或重试 | |
console.error('player fetch error: ', sid, r.error_code); | |
self.trigger('error', r); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment