通过 Spotify App API 从队列中获取下一首曲目

发布于 2025-01-07 07:41:40 字数 169 浏览 2 评论 0 原文

有没有办法从播放器队列中获取下一首曲目?

我使用以下方式获取当前曲目:

var player = models.player;
var playerTrackInfo = player.track;

但我找不到获取上下文或下一个曲目的方法。

Is there anyway to get the next tracks from the player queue?

I get the current track using:

var player = models.player;
var playerTrackInfo = player.track;

But I can't find the way to get the context, or the next track.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

单挑你×的.吻 2025-01-14 07:41:41

该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.html

A workaround could be to construct a temporary playlist and then inspect the next track programmatically.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文