You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
456 B
14 lines
456 B
import SpotifyiOS
|
|
import Flutter
|
|
|
|
class PlayerDelegate: NSObject, SPTAppRemotePlayerStateDelegate {
|
|
|
|
var playerStateSink: FlutterEventSink?
|
|
var playerContextSink: FlutterEventSink?
|
|
|
|
func playerStateDidChange(_ playerState: SPTAppRemotePlayerState) {
|
|
print("playerStateDidChange")
|
|
playerStateSink?(State.playerStateDictionary(playerState).json)
|
|
playerContextSink?(State.playerContextDictionary(playerState).json)
|
|
}
|
|
}
|
|
|