Skip to content

Commit

Permalink
Allow manual resyncing of command center commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Sep 23, 2021
1 parent 3c8ecb3 commit b19d01b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SwiftAudioEx/Classes/AudioPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@ public class AudioPlayer: AVPlayerWrapperDelegate {
self.enableRemoteCommands(remoteCommands)
}
}

/**
Syncs the current remoteCommands with the iOS command center.
Can be used to update item states - e.g. like, dislike and bookmark.
*/
public func syncRemoteCommandsWithCommandCenter() {
self.enableRemoteCommands(remoteCommands)
}

// MARK: - NowPlayingInfo

Expand Down

0 comments on commit b19d01b

Please sign in to comment.