SwiftAudio icon indicating copy to clipboard operation
SwiftAudio copied to clipboard

Less constrained RemoteCommandController

Open rurza opened this issue 4 years ago • 1 comments

Hey! Right now AudioPlayer asks items for related remote commands or uses those provided when track changes. I find very useful to have the ability to refresh them later (because of the how backend's API is designed) – unfortunately current API doesn't allow to do that. Maybe a new function or remoteCommands didSet block?

public var remoteCommands: [RemoteCommand] = [] {
    didSet {
        if let currentItem = currentItem {
            enableRemoteCommands(forItem: currentItem)
        }
    }
}

rurza avatar Jul 16 '19 07:07 rurza

Yep, seems like a fair thing to include!

jorgenhenrichsen avatar Jul 16 '19 16:07 jorgenhenrichsen