Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プレイリストがあり、トラックを順番に再生したいのですが、新しいトラックが読み込まれるたびに、関数を呼び出したいと思います。このイベントを聞くにはどうすればよいですか?
SPPlaybackManager、CocoaLibSpotifyの再生クラスは、トラックを順番に自動的に再生しないため、毎回再生するように手動で指示する必要があります。あなたはそれを管理しているので、新しいトラックがいつ再生を開始するかをすでに知っています。
SPPlaybackManager
さらに、オーディオがスピーカーに到達し始めたときに通知するSPPlaybackManagerDelegateメソッドがあります。-playbackManagerWillStartPlayingAudio:
SPPlaybackManagerDelegate
-playbackManagerWillStartPlayingAudio: