通过 Spotify App API 从队列中获取下一首曲目
有没有办法从播放器队列中获取下一首曲目?
我使用以下方式获取当前曲目:
var player = models.player;
var playerTrackInfo = player.track;
但我找不到获取上下文或下一个曲目的方法。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该API不支持读取下一个播放的曲目。
Player
模型确实可以让您跳到下一个曲目:https://developer.spotify.com/docs/apps/api/1.0/api-models-player.html解决方法可能是构建一个临时播放列表,然后检查下一个以编程方式跟踪。
The API doesn't support reading the next-playing track. The
Player
model does let you skip to the next track though: https://developer.spotify.com/docs/apps/api/1.0/api-models-player.htmlA workaround could be to construct a temporary playlist and then inspect the next track programmatically.