在Spotify的API访问当前位置 [英] Access current position in Spotify Api
本文介绍了在Spotify的API访问当前位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于Spotify的改变在他们最近的API,其文档是不是最大的。他们的文档说来访问的一首歌,获得'models.player.position它记录作为被不确定的当前位置。
Since Spotify changed around their API recently, their documentation isn't the greatest. Their docs say to access the current position in a song, access `models.player.position' which logs as being undefined.
有没有人有更好的运气获得新Spotify的API乐曲位置?
Has anyone had better luck getting the song position with the new Spotify API?
推荐答案
位置
是需要通过负载获取一个属性
功能:
models.player.load('position')
.done(
function(p){
/* p.position stores the current position */
});
这篇关于在Spotify的API访问当前位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文