Hi JoeKun. Really thanks to your reply.I have tried many times as you taught me a few days ago.I tried to add almost all of the commands. But I cannot see it anyone.- I tried it both simulator and real device- I do not prepare any plyable-contents because the apple's not playing app can show the bottom buttons without that.My example is here! please let me know. Big thanks in advance.class PlayerInterfaceController: WKInterfaceController { var like: Any! var dislike: Any! var bookmark: Any! override func awake(withContext context: Any?) { super.awake(withContext: context) let shared = MPRemoteCommandCenter.shared() shared.likeCommand.isEnabled = true shared.bookmarkCommand.isEnabled = true shared.dislikeCommand.isEnabled = true shared.likeCommand.localizedTitle = "HAPPY" shared.likeCommand.localizedShortTitle = "HB" self.like = shared.likeCommand.addTarget { (event) -> MPRemoteCommandHandlerStatus in return .success } shared.dislikeCommand.localizedTitle = "UNHAPPY" shared.dislikeCommand.localizedShortTitle = "UB" self.dislike = shared.dislikeCommand.addTarget { (event) -> MPRemoteCommandHandlerStatus in return .success } shared.bookmarkCommand.localizedTitle = "BOOKMARK" shared.bookmarkCommand.localizedShortTitle = "BK" self.bookmark = shared.bookmarkCommand.addTarget { (event) -> MPRemoteCommandHandlerStatus in return .success } }}Best regards
Post
Replies
Boosts
Views
Activity
Thanks a lot. But I have a question.Apple's now playing app shows three buttons regardless of the plyable contents on the bottom.How can make like this? Your answer is helpful.Thanks a lot! JoeKun
to Polyphonic
Thanks to your reply.
The audio content's url can change according to time. This is our service's current business logic.
(In business logic, For example, there are multi access check in other device, streaming right check, fetch next track's url and so on)
So, after finishing the playing of the current track, I have to fetch a next track's audio content url and use the fetched it to make URLAsset. Therefore I cannot use AVQueuePlayer.
There are any solution for in this situation...?
I think there were no problems until watchOS6.
Thanks to your reply.
to salfromnew_york
Thanks to your reply.
Sometimes it can work very well. But sometimes it cannot work also.
I'm very appreciate but it is not a clear solution for me.
to Polyphonic.
The URL for audio contents is only available for just about 10 minute.
So If I move to the next track, I have to fetch a new URL and make a URLAsset with it.
This is our service's privacy policy.
In this situation, I fetched with URLSession in background and working well for audio streaming in watchOS6.
but It doesn't work anymore in watchOS7.
Please give me any help... Thanks.