Spotify + Facebook 集成 - 点击 Facebook 上的暂停按钮几乎会立即暂停我的本机 Mac 客户端。这是怎么做到的?

发布于 2024-12-06 02:53:56 字数 87 浏览 3 评论 0原文

正如问题所读。如果我转到我的 FB 活动,它会显示正在播放的曲目和暂停按钮。如果我点击“暂停”,它会立即暂停我的本机 Spotify 应用程序。这是如何实施的?

Just as the question reads. If I goto my FB Activity, it shows the track that's being played and a pause button. If I hit "Pause" it pauses my native spotify app instantaneously. How is this implemented?

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

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

发布评论

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

评论(3

沒落の蓅哖 2024-12-13 02:53:56

Facebook 网站上的 JavaScript 向 Spotify 托管的网络服务提交请求。我确实相信 Spotify 的客户端应用程序与 Spotify 的服务器保持连接。 Spotify 能够在客户端不提出请求的情况下向用户推送内容,因此该网络服务似乎就是这样做的。根据我的研究,我无法发现通过任何 API 方法开发类似的功能是可行的,无论是来自 Spotify 还是 Facebook。

The JavaScript on Facebook's site submits a request to a web service hosted by Spotify. I do believe that Spotify's client-side application maintains a connection with Spotify's servers. Spotify is able to push content to the user without the client making a request for it, so this web service seems to do this. From my research, I can't find that developing similar functionality is feasible via any API method, whether from Spotify or Facebook.

飘落散花 2024-12-13 02:53:56

Spotify 嵌入了一个带有 Facebook 直接使用的远程控制 API 的网络服务器。

Spotify embeds a web server with a remote control API that Facebook uses directly.

一口甜 2024-12-13 02:53:56

Facebook 和 Spotify 有着特殊的合作关系。目前其他开发人员无法使用这种类型的集成。

Facebook and Spotify have a special partnership. This type of integration is not currently available to other developers.

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