Media Player

RSS for tag

Find and play songs, audio podcasts, audio books, and more from within your app using Media Player.

Posts under Media Player tag

200 Posts

Post

Replies

Boosts

Views

Activity

NowPlaying State Not Updating on Apple Watch
My app plays music via AVAudioEngine. I'm using effects that prohibit me from using a built-in audio player. I'm using MPNowPlayingInfoCenter to provide information to the NowPlaying app on the Apple Watch. When I play a song, the Apple Watch displays the song metadata. When I hit pause on my phone, the Apple Watch shows that the track is no longer advancing via the progress wheel; however, it continues to display the pause button even though the music is paused. Ideally, it would switch to the play symbol when the music is paused. In the documentation it says you can use the playBackState var to set the playback state in macOS. There does not seem to be an equivalent in iOS. I figured maybe the watch would know to switch the pause symbol to the play symbol when the playback rate is 0, but it does not. All other functionality is working properly. The only thing that doesn't update on the watch is the pause / play symbol when the music toggles between play and pause by tapping my phone or from receiving remote command events. Thank you in advance for your help.
0
0
1.1k
Apr ’23
Command Center media buttons is not syncing with App's media state Swift
I have created a media player plugin and exported it via swift framework for my Unity project, the media player works fine on the app. But, when the App's media state is paused the Command Center media button does not update its still on the pause icon and same as with playing the command center button does not update. I already have initiated the AVAudioSession shared instance and set the category to .playback and have also set the .setActive to true. let audioSession = AVAudioSession .sharedInstance() try audioSession .setCategory( .playback, mode: .default ) print("Playback OK") try audioSession.setActive(true) print("Session is Active") I also have initialised the command center, for handling the play and pause events whenever the buttons are clicked in command center. self.commandCenter.playCommand.isEnabled = true self.commandCenter.playCommand.addTarget { [weak self] (event) -> MPRemoteCommandHandlerStatus in self?.play() return .success } self.commandCenter.pauseCommand.isEnabled = true self.commandCenter.pauseCommand.addTarget { [weak self] (event) -> MPRemoteCommandHandlerStatus in self?.pause() return .success } This is the code for the handling the pause self.nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = CMTimeGetSeconds(self.player.currentTime()) self.nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = CMTimeGetSeconds(self.player.currentItem!.duration); self.nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = 0 self.nowPlayingInfo[MPNowPlayingInfoPropertyDefaultPlaybackRate] = 0 MPNowPlayingInfoCenter.default().nowPlayingInfo = self.nowPlayingInfo self.player.pause() and This is the code for handling the play self.nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = CMTimeGetSeconds(self.player.currentTime()) self.nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = CMTimeGetSeconds(self.player.currentItem!.duration); self.nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = 1 self.nowPlayingInfo[MPNowPlayingInfoPropertyDefaultPlaybackRate] = 1 MPNowPlayingInfoCenter.default().nowPlayingInfo = self.nowPlayingInfo; self.player.play() What i am expecting is when i click on pause in the App the command center's button should be the play icon if I click on play the command center's button should be pause icon, but right now nothing is working. Please tell me what I am missing here?
1
0
1.3k
Apr ’23
CarPlay: CPListItem isPlaying indicator not updating
I've created a CPListTemplate with dynamic list entries from an API. All entries are different music channels. In my ForEach for generating all list entries, I've set the .isPlaying property to true and also the playingIndicatorLocation to .trailing. If I play a channel, the isPlaying indicator is animated on every list entries. I've set different metadata in the MPNowPlayingInfoCenter and this is correct inside the CPNowPlayingTemplate. Do I need to set some identifier somewhere, so my list template knows which channel is currently playing? If so where can I set this?
1
0
1.1k
Apr ’23
Matching the Queue.CurrentEntry.Item.ID with a Song's ID. Can't tell if it's a bug
I'm trying to match the id of the song currently playing with the id of the song I added to the queue, but they never match. musicPlayer.queue = [mySongVar] print(mySongVar) This will print out: Song(id: "i.eoqMkIkPJ9Ea", title: "À peu près", artistName: "Pomme") then I tell the musicPlayer to play what's in the queue and print: print(musicPlayer.queue.currentEntry!.item!.description) And I´ll get this: MusicPlayer.Queue.Entry.Item.song(Song(id: "1440887303", title: "À peu près", artistName: "Pomme")) I don't understand why the Song.id for the Item for the queue's current entry is a a certain string, but the if for my original Song object I sent to the queue is something else entirely. I'm not sure if I'm going about this the wrong way. I'd really appreciate some help/guidance! Thanks" By the way: let musicPlayer = ApplicationMusicPlayer.shared
1
0
1.1k
Apr ’23
-[MPVolumeView initWithFrame:style:] block main thread
MediaPlayer -[MPVolumeView initWithFrame:style:] + 80 MediaPlayer -[MPVolumeView _initWithStyle:] + 124 MediaPlayer -[MPAVLightweightRoutingController initWithName:] + 140 AVFCore -[AVOutputDeviceDiscoverySession initWithDeviceFeatures:] + 84 I get an application Not Responding problem by capturing function call stack every runloop(1/60s frequency) and get same call stack at about 5 second. MediaPlayer -[MPVolumeView initWithFrame:style:] + 80 MediaPlayer -[MPVolumeView _initWithStyle:] + 124 MediaPlayer -[MPAVLightweightRoutingController initWithName:] + 140 AVFCore -[AVOutputDeviceDiscoverySession initWithDeviceFeatures:] + 84 AVFCore -[AVFigRouteDiscovererOutputDeviceDiscoverySessionFactory outputDeviceDiscoverySessionOfClass:withDeviceFeatures:] + 216 AVFCore -[AVFigRouteDiscovererOutputDeviceDiscoverySessionImpl initWithFigRouteDiscovererCreator:syncController:] + 156 AVFCore _AVFigRouteDiscovererFactoryCreateRouteDiscovererWithType + 132 AVFCore -[AVFigRemoteRouteDiscovererFactory createRouteDiscovererWithAllocator:options:] + 40 MediaExperience _FigRouteDiscovererXPCRemoteCreate + 912 CoreMedia _FigXPCRemoteClientSendSyncMessageCreatingReply + 40 libxpc.dylib _xpc_connection_send_message_with_reply_sync + 228 libdispatch.dylib _dispatch_mach_send_with_result_and_wait_for_reply + 60 libdispatch.dylib __dispatch_mach_send_and_wait_for_reply + 532 libsystem_kernel.dylib _mach_msg + 72 libsystem_kernel.dylib _mach_msg_trap + 8``` It seems that sync waiting for a xpc reply, I want to solve this by call `-[MPAVLightweightRoutingController initWithName:]` on a background thread, but it's call from `-[MPVolumeView initWithFrame:style:]`, I can not create UIView object from background thread. I have no idea about how to solve this.
2
0
1.1k
Apr ’23
Crash in MediaToolbox __setVideoBounds_block_invoke
We are getting MediaToolbox crash in tvOS and iOS 14* versions. Stack track is not providing any details about origin of the issue. Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x54a8 objc_msgSend + 8 1 MediaToolbox 0x2ba198 __setVideoBounds_block_invoke + 84 2 libdispatch.dylib 0x579c _dispatch_call_block_and_release + 24 3 libdispatch.dylib 0x6fdc _dispatch_client_callout + 16 4 libdispatch.dylib 0x13de4 _dispatch_main_queue_callback_4CF + 872 5 CoreFoundation 0x9d030 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 6 CoreFoundation 0x974e8 __CFRunLoopRun + 2480 7 CoreFoundation 0x96600 CFRunLoopRunSpecific + 572 8 GraphicsServices 0x6598 GSEventRunModal + 160 9 UIKitCore 0x9e3b98 -[UIApplication _run] + 1060 10 UIKitCore 0x9e9148 UIApplicationMain + 164 11 libswiftUIKit.dylib 0xf7a4 UIApplicationMain(_:_:_:_:) + 100 12 hotstarx-tvos 0x7350 main + 4313412432 (RequestButton.swift:4313412432) 13 libdyld.dylib 0x25fc start + 4 2022-11-16_08-26-25.9239_+0200-d28480707c71a8eed186b5d64400dbe3fe2425bf.crash
0
0
664
Apr ’23
Crash in MediaToolbox __setVideoBounds_block_invoke
We are getting MediaToolbox crash in tvOS 14* versions. Stack track is not providing any details about origin of the issue. Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x54a8 objc_msgSend + 8 1 MediaToolbox 0x2ba198 __setVideoBounds_block_invoke + 84 2 libdispatch.dylib 0x579c _dispatch_call_block_and_release + 24 3 libdispatch.dylib 0x6fdc _dispatch_client_callout + 16 4 libdispatch.dylib 0x13de4 _dispatch_main_queue_callback_4CF + 872 5 CoreFoundation 0x9d030 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 6 CoreFoundation 0x974e8 __CFRunLoopRun + 2480 7 CoreFoundation 0x96600 CFRunLoopRunSpecific + 572 8 GraphicsServices 0x6598 GSEventRunModal + 160 9 UIKitCore 0x9e3b98 -[UIApplication _run] + 1060 10 UIKitCore 0x9e9148 UIApplicationMain + 164 11 libswiftUIKit.dylib 0xf7a4 UIApplicationMain(_:_:_:_:) + 100 12 hotstarx-tvos 0x7350 main + 4313412432 (RequestButton.swift:4313412432) 13 libdyld.dylib 0x25fc start + 4 2022-11-16_08-26-25.9239_+0200-d28480707c71a8eed186b5d64400dbe3fe2425bf.crash
1
0
956
Apr ’23
Signing error when implementing playbackState reporting
Hi, I'm trying set playbackState like swift MPNowPlayingInfoCenter.default().playbackState = .playing But I receive an error in console. [NowPlaying] [MRNowPlaying] Ignoring setPlaybackState because application does not contain entitlement com.apple.mediaremote.set-playback-state for platform I tried to add it to applications *.entitlements file: xml     keycom.apple.mediaremote.set-playback-state/key     true/ But after that I cannot even build my application due to signing error: Provisioning profile "iOS Team Provisioning Profile: app.name" doesn't include the com.apple.mediaremote.set-playback-state entitlement. I use a free development certificate if it is important. Xcode version is 12.4. Did anyone face with same issue? What do I wrong? What should I do to solve an issue? Thanks for any help!
6
1
6.1k
Mar ’23
Chromecast videos from own website on a view controller
Hi all, I have enabled the ChromeCast icon via Google Cast SDK framework in my app. I am able to cast to my TV, that works fine. But, I cannot cast any media. It says "No media selected" although I am opening a video file and play it. I have an app that is connected to my website so I use UIWebKit and WebView to display my content. On my site I have lots of videos that I would like to be able to cast via ChromeCast, just like Netflix and other streaming video apps. Does anyone know if this is possible and if so, what is needed in the code to make that possible? Thank you very much in advance!
0
0
570
Mar ’23
"[SDKPlayback] applicationController: xpc service connection interrupted" for MPMusicPlayerController.applicationMusicPlayer iOS 16.3.1
Hi! I'm having a problem that I cannot seem to figure out. I have not made any changes to my app, yet this suddenly started happening. I think it started happening after I upgraded my phone to iOS 16.3.1, but I am not entirely sure. Pseudocode: // (1) initialise player let player = MPMusicPlayerController.applicationMusicPlayer // (2) ..later, a button is pressed and we call play() player.play(myAlbumId) // (3) a background timer runs, which will ensure we are playing for 30 seconds, and pausing for 60 seconds (this is a workout app): self.timer = Timer(timeInterval: 1.0, target: self, selector: #selector(togglePauseIfNeeded), userInfo: nil, repeats: true) RunLoop.current.add(self.timer!, forMode: .common) // (4) Now, the problem occurs when the timer triggers play, the second time we are playing music (ie, it works the initial time, but in that case, play was triggered by a button press (step 2)). // So when the timer now calls player.play(), we see this error: "[SDKPlayback] applicationController: xpc service connection interrupted" player.play() Interestingly, if I manually hit play just a few seconds before the timer would have called "play" (at step 4), it works fine. Any thoughts or help on this would be highly appreciated! <3
0
0
811
Mar ’23
Podcast -Error (This server does not support HTTP head requests)
Hello i was setup an Podcast rss under the following url: https://www.eybwallwitz.de/feeds/podcasts/ But i dont get it up running. When i validate the Feed with https://podba.se/ it says: everything is ok: https://podba.se/validate/?url=https://www.eybwallwitz.de/feeds/podcasts But when i use https://www.castfeedvalidator.com/validate.php?url=https://www.eybwallwitz.de/feeds/podcasts i get the Message: FATAL: This server does not support HTTP head requests. Head request support required for Apple Podcasts. Did not finish media tests. I really dont get the problem. I use a nginx 1.18 webserver. Cause i didnt found the problem i explicit allowed HEAD, GET, POST, Options on Feed URL I adjustet mp3 urls with content-disposition: inline; filename="$filename" But nothing works. I tryed to load the feed into my podcast app but the feed from url didnt work, so validator 2 looks like to be right, that there is a problem. i used curl --head to verify check and compare between an old feed an the new one old: https://2020.eybwallwitz.de/de/publikationen/podcast/feed/ new: https://www.eybwallwitz.de/feeds/podcasts/ i expect the problem somewhere in nginx. so if u need more infos, please give me a sign. also when u have any idea what i can do/test to get this problem away. currently i dont have any idea left. thx peter
0
0
661
Feb ’23
The class AudioFileResource of RealityKit can not play audio
I am using RealitKit SDK to insert audio into the AR program. According to the description on the official website, I need to use the class AudioFileResource to load audio, and then the Entity object calls the prepareAudio() method to get an AudioPlaybackController, which is used to play audio, but there is no sound. Has anyone ever encountered this situation?
0
0
621
Feb ’23
IOS 16.1.1 Automatic resume playback
When playing music or a podcast in the Spotify application (as well as using car play), an audio notification may occur from the Waze application, after the notification, playback in the Spotify application usually continues automatically. Well, the new update does not work properly to automatically resume listening, you need to press play again in the Spotify app. Please fix it, it's very annoying.
1
2
2.1k
Feb ’23
Preload AVAsset
I have to make sure that I have fully loaded the videos before playing them. I went through the Apple documentation but couldn't find how to do it. I tried AVAssetDownloadTask but I don't want to keep the files. I want them to be deleted after the app is closed. Is there a recommended method for this? I need to make sure the videos are fully downloaded and ready to play. So AVPlayer's default behavior doesn't work for me
0
1
878
Feb ’23
Apple CarPlay Issue
Hello everyone, Apple CarPlay is implemented in one of my applications by using MediaPlayer Framework. It is working properly if iPhone is locked, the App is in the background, or in an Active state. But I want to play audio from CarPlay even if the App is in a terminated state similar to Spotify app does. In case of application is not opened in the phone, on CarPlay display selecting the station does not play the song. You can see in the below videos for both cases: [https://algoworks-my.sharepoint.com/:v:/p/ankit_singh/EQ3HzSKEl-pGpMIK0vh7HIkBtWg50-vco3aTyxOZevmuTA?e=2pmmWB) [https://algoworks-my.sharepoint.com/:v:/p/ankit_singh/EeI8qai1iftKvwo9nogCJREBFQXCf3qf8d-qwIt-25CB7g?e=bkYqAH) I tried many things but not able to achieve this. So help me with this and share some code to review. Thanks.
0
0
1.1k
Feb ’23
Making a task while phone is locked works on simulator, but not on physical device
I am working on an app that makes a custom alarm so I am using long music from outsourced platforms like Spotify, everything is done but the current issue is when I try to play the music when the phone is locked it doesn't work on a physical device but works on the simulator!, what I am doing is schedule a local notification to turn on the screen at this time then play the music from a scheduled timer. Here is the snippet of the code responsible for this. let timer = Timer(timeInterval: time.timeIntervalSinceNow, repeats: false) { timer in // Doing the task here! playAlarm() } RunLoop.current.add(timer, forMode: .common) Note: To run this task when the phone is locked I am sending a local notification at this time to turn on the screen to make it possible to run this task. Please let me know if this is possible as I see some apps doing this
0
0
776
Jan ’23
NowPlaying State Not Updating on Apple Watch
My app plays music via AVAudioEngine. I'm using effects that prohibit me from using a built-in audio player. I'm using MPNowPlayingInfoCenter to provide information to the NowPlaying app on the Apple Watch. When I play a song, the Apple Watch displays the song metadata. When I hit pause on my phone, the Apple Watch shows that the track is no longer advancing via the progress wheel; however, it continues to display the pause button even though the music is paused. Ideally, it would switch to the play symbol when the music is paused. In the documentation it says you can use the playBackState var to set the playback state in macOS. There does not seem to be an equivalent in iOS. I figured maybe the watch would know to switch the pause symbol to the play symbol when the playback rate is 0, but it does not. All other functionality is working properly. The only thing that doesn't update on the watch is the pause / play symbol when the music toggles between play and pause by tapping my phone or from receiving remote command events. Thank you in advance for your help.
Replies
0
Boosts
0
Views
1.1k
Activity
Apr ’23
Command Center media buttons is not syncing with App's media state Swift
I have created a media player plugin and exported it via swift framework for my Unity project, the media player works fine on the app. But, when the App's media state is paused the Command Center media button does not update its still on the pause icon and same as with playing the command center button does not update. I already have initiated the AVAudioSession shared instance and set the category to .playback and have also set the .setActive to true. let audioSession = AVAudioSession .sharedInstance() try audioSession .setCategory( .playback, mode: .default ) print("Playback OK") try audioSession.setActive(true) print("Session is Active") I also have initialised the command center, for handling the play and pause events whenever the buttons are clicked in command center. self.commandCenter.playCommand.isEnabled = true self.commandCenter.playCommand.addTarget { [weak self] (event) -> MPRemoteCommandHandlerStatus in self?.play() return .success } self.commandCenter.pauseCommand.isEnabled = true self.commandCenter.pauseCommand.addTarget { [weak self] (event) -> MPRemoteCommandHandlerStatus in self?.pause() return .success } This is the code for the handling the pause self.nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = CMTimeGetSeconds(self.player.currentTime()) self.nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = CMTimeGetSeconds(self.player.currentItem!.duration); self.nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = 0 self.nowPlayingInfo[MPNowPlayingInfoPropertyDefaultPlaybackRate] = 0 MPNowPlayingInfoCenter.default().nowPlayingInfo = self.nowPlayingInfo self.player.pause() and This is the code for handling the play self.nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = CMTimeGetSeconds(self.player.currentTime()) self.nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = CMTimeGetSeconds(self.player.currentItem!.duration); self.nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = 1 self.nowPlayingInfo[MPNowPlayingInfoPropertyDefaultPlaybackRate] = 1 MPNowPlayingInfoCenter.default().nowPlayingInfo = self.nowPlayingInfo; self.player.play() What i am expecting is when i click on pause in the App the command center's button should be the play icon if I click on play the command center's button should be pause icon, but right now nothing is working. Please tell me what I am missing here?
Replies
1
Boosts
0
Views
1.3k
Activity
Apr ’23
CarPlay: CPListItem isPlaying indicator not updating
I've created a CPListTemplate with dynamic list entries from an API. All entries are different music channels. In my ForEach for generating all list entries, I've set the .isPlaying property to true and also the playingIndicatorLocation to .trailing. If I play a channel, the isPlaying indicator is animated on every list entries. I've set different metadata in the MPNowPlayingInfoCenter and this is correct inside the CPNowPlayingTemplate. Do I need to set some identifier somewhere, so my list template knows which channel is currently playing? If so where can I set this?
Replies
1
Boosts
0
Views
1.1k
Activity
Apr ’23
Matching the Queue.CurrentEntry.Item.ID with a Song's ID. Can't tell if it's a bug
I'm trying to match the id of the song currently playing with the id of the song I added to the queue, but they never match. musicPlayer.queue = [mySongVar] print(mySongVar) This will print out: Song(id: "i.eoqMkIkPJ9Ea", title: "À peu près", artistName: "Pomme") then I tell the musicPlayer to play what's in the queue and print: print(musicPlayer.queue.currentEntry!.item!.description) And I´ll get this: MusicPlayer.Queue.Entry.Item.song(Song(id: "1440887303", title: "À peu près", artistName: "Pomme")) I don't understand why the Song.id for the Item for the queue's current entry is a a certain string, but the if for my original Song object I sent to the queue is something else entirely. I'm not sure if I'm going about this the wrong way. I'd really appreciate some help/guidance! Thanks" By the way: let musicPlayer = ApplicationMusicPlayer.shared
Replies
1
Boosts
0
Views
1.1k
Activity
Apr ’23
-[MPVolumeView initWithFrame:style:] block main thread
MediaPlayer -[MPVolumeView initWithFrame:style:] + 80 MediaPlayer -[MPVolumeView _initWithStyle:] + 124 MediaPlayer -[MPAVLightweightRoutingController initWithName:] + 140 AVFCore -[AVOutputDeviceDiscoverySession initWithDeviceFeatures:] + 84 I get an application Not Responding problem by capturing function call stack every runloop(1/60s frequency) and get same call stack at about 5 second. MediaPlayer -[MPVolumeView initWithFrame:style:] + 80 MediaPlayer -[MPVolumeView _initWithStyle:] + 124 MediaPlayer -[MPAVLightweightRoutingController initWithName:] + 140 AVFCore -[AVOutputDeviceDiscoverySession initWithDeviceFeatures:] + 84 AVFCore -[AVFigRouteDiscovererOutputDeviceDiscoverySessionFactory outputDeviceDiscoverySessionOfClass:withDeviceFeatures:] + 216 AVFCore -[AVFigRouteDiscovererOutputDeviceDiscoverySessionImpl initWithFigRouteDiscovererCreator:syncController:] + 156 AVFCore _AVFigRouteDiscovererFactoryCreateRouteDiscovererWithType + 132 AVFCore -[AVFigRemoteRouteDiscovererFactory createRouteDiscovererWithAllocator:options:] + 40 MediaExperience _FigRouteDiscovererXPCRemoteCreate + 912 CoreMedia _FigXPCRemoteClientSendSyncMessageCreatingReply + 40 libxpc.dylib _xpc_connection_send_message_with_reply_sync + 228 libdispatch.dylib _dispatch_mach_send_with_result_and_wait_for_reply + 60 libdispatch.dylib __dispatch_mach_send_and_wait_for_reply + 532 libsystem_kernel.dylib _mach_msg + 72 libsystem_kernel.dylib _mach_msg_trap + 8``` It seems that sync waiting for a xpc reply, I want to solve this by call `-[MPAVLightweightRoutingController initWithName:]` on a background thread, but it's call from `-[MPVolumeView initWithFrame:style:]`, I can not create UIView object from background thread. I have no idea about how to solve this.
Replies
2
Boosts
0
Views
1.1k
Activity
Apr ’23
Crash in MediaToolbox __setVideoBounds_block_invoke
We are getting MediaToolbox crash in tvOS and iOS 14* versions. Stack track is not providing any details about origin of the issue. Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x54a8 objc_msgSend + 8 1 MediaToolbox 0x2ba198 __setVideoBounds_block_invoke + 84 2 libdispatch.dylib 0x579c _dispatch_call_block_and_release + 24 3 libdispatch.dylib 0x6fdc _dispatch_client_callout + 16 4 libdispatch.dylib 0x13de4 _dispatch_main_queue_callback_4CF + 872 5 CoreFoundation 0x9d030 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 6 CoreFoundation 0x974e8 __CFRunLoopRun + 2480 7 CoreFoundation 0x96600 CFRunLoopRunSpecific + 572 8 GraphicsServices 0x6598 GSEventRunModal + 160 9 UIKitCore 0x9e3b98 -[UIApplication _run] + 1060 10 UIKitCore 0x9e9148 UIApplicationMain + 164 11 libswiftUIKit.dylib 0xf7a4 UIApplicationMain(_:_:_:_:) + 100 12 hotstarx-tvos 0x7350 main + 4313412432 (RequestButton.swift:4313412432) 13 libdyld.dylib 0x25fc start + 4 2022-11-16_08-26-25.9239_+0200-d28480707c71a8eed186b5d64400dbe3fe2425bf.crash
Replies
0
Boosts
0
Views
664
Activity
Apr ’23
Crash in MediaToolbox __setVideoBounds_block_invoke
We are getting MediaToolbox crash in tvOS 14* versions. Stack track is not providing any details about origin of the issue. Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x54a8 objc_msgSend + 8 1 MediaToolbox 0x2ba198 __setVideoBounds_block_invoke + 84 2 libdispatch.dylib 0x579c _dispatch_call_block_and_release + 24 3 libdispatch.dylib 0x6fdc _dispatch_client_callout + 16 4 libdispatch.dylib 0x13de4 _dispatch_main_queue_callback_4CF + 872 5 CoreFoundation 0x9d030 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 6 CoreFoundation 0x974e8 __CFRunLoopRun + 2480 7 CoreFoundation 0x96600 CFRunLoopRunSpecific + 572 8 GraphicsServices 0x6598 GSEventRunModal + 160 9 UIKitCore 0x9e3b98 -[UIApplication _run] + 1060 10 UIKitCore 0x9e9148 UIApplicationMain + 164 11 libswiftUIKit.dylib 0xf7a4 UIApplicationMain(_:_:_:_:) + 100 12 hotstarx-tvos 0x7350 main + 4313412432 (RequestButton.swift:4313412432) 13 libdyld.dylib 0x25fc start + 4 2022-11-16_08-26-25.9239_+0200-d28480707c71a8eed186b5d64400dbe3fe2425bf.crash
Replies
1
Boosts
0
Views
956
Activity
Apr ’23
Apple Music change volume
I'm integrating Apple Music on my ios app, and I want to change the volume programmatically. I'm using: let player = MPMusicPlayerController.applicationQueuePlayer player. But I found that this player doesn't have an API for changing volume. Any solutions, please?
Replies
0
Boosts
0
Views
734
Activity
Mar ’23
AVSampleBufferDisplayLayer: videoGravity do not work
Version: 14.x Setting videoGravity of AVSampleBufferDisplayLayer does not work, however, when I change bounds of this layer, it worked, is this a bug or feature? but in iOS 15, this propery worked well.
Replies
1
Boosts
0
Views
1.3k
Activity
Mar ’23
How do I access a FairPlay protected stream's frame in avplayer?
when i played a fairplay streaming by avplayer,calling copyPixelBufferForItemTime on AVPlayerItemVideoOutput the pixelbuffer returns NULL.is there any way to get the pixel buffer from a stream that is protected using FairPlay on iOS or apple's APIs in order to display FairPlay stream on an OpenGL texture in 3D space?
Replies
1
Boosts
0
Views
719
Activity
Mar ’23
Signing error when implementing playbackState reporting
Hi, I'm trying set playbackState like swift MPNowPlayingInfoCenter.default().playbackState = .playing But I receive an error in console. [NowPlaying] [MRNowPlaying] Ignoring setPlaybackState because application does not contain entitlement com.apple.mediaremote.set-playback-state for platform I tried to add it to applications *.entitlements file: xml     keycom.apple.mediaremote.set-playback-state/key     true/ But after that I cannot even build my application due to signing error: Provisioning profile "iOS Team Provisioning Profile: app.name" doesn't include the com.apple.mediaremote.set-playback-state entitlement. I use a free development certificate if it is important. Xcode version is 12.4. Did anyone face with same issue? What do I wrong? What should I do to solve an issue? Thanks for any help!
Replies
6
Boosts
1
Views
6.1k
Activity
Mar ’23
Chromecast videos from own website on a view controller
Hi all, I have enabled the ChromeCast icon via Google Cast SDK framework in my app. I am able to cast to my TV, that works fine. But, I cannot cast any media. It says "No media selected" although I am opening a video file and play it. I have an app that is connected to my website so I use UIWebKit and WebView to display my content. On my site I have lots of videos that I would like to be able to cast via ChromeCast, just like Netflix and other streaming video apps. Does anyone know if this is possible and if so, what is needed in the code to make that possible? Thank you very much in advance!
Replies
0
Boosts
0
Views
570
Activity
Mar ’23
"[SDKPlayback] applicationController: xpc service connection interrupted" for MPMusicPlayerController.applicationMusicPlayer iOS 16.3.1
Hi! I'm having a problem that I cannot seem to figure out. I have not made any changes to my app, yet this suddenly started happening. I think it started happening after I upgraded my phone to iOS 16.3.1, but I am not entirely sure. Pseudocode: // (1) initialise player let player = MPMusicPlayerController.applicationMusicPlayer // (2) ..later, a button is pressed and we call play() player.play(myAlbumId) // (3) a background timer runs, which will ensure we are playing for 30 seconds, and pausing for 60 seconds (this is a workout app): self.timer = Timer(timeInterval: 1.0, target: self, selector: #selector(togglePauseIfNeeded), userInfo: nil, repeats: true) RunLoop.current.add(self.timer!, forMode: .common) // (4) Now, the problem occurs when the timer triggers play, the second time we are playing music (ie, it works the initial time, but in that case, play was triggered by a button press (step 2)). // So when the timer now calls player.play(), we see this error: "[SDKPlayback] applicationController: xpc service connection interrupted" player.play() Interestingly, if I manually hit play just a few seconds before the timer would have called "play" (at step 4), it works fine. Any thoughts or help on this would be highly appreciated! <3
Replies
0
Boosts
0
Views
811
Activity
Mar ’23
Podcast -Error (This server does not support HTTP head requests)
Hello i was setup an Podcast rss under the following url: https://www.eybwallwitz.de/feeds/podcasts/ But i dont get it up running. When i validate the Feed with https://podba.se/ it says: everything is ok: https://podba.se/validate/?url=https://www.eybwallwitz.de/feeds/podcasts But when i use https://www.castfeedvalidator.com/validate.php?url=https://www.eybwallwitz.de/feeds/podcasts i get the Message: FATAL: This server does not support HTTP head requests. Head request support required for Apple Podcasts. Did not finish media tests. I really dont get the problem. I use a nginx 1.18 webserver. Cause i didnt found the problem i explicit allowed HEAD, GET, POST, Options on Feed URL I adjustet mp3 urls with content-disposition: inline; filename="$filename" But nothing works. I tryed to load the feed into my podcast app but the feed from url didnt work, so validator 2 looks like to be right, that there is a problem. i used curl --head to verify check and compare between an old feed an the new one old: https://2020.eybwallwitz.de/de/publikationen/podcast/feed/ new: https://www.eybwallwitz.de/feeds/podcasts/ i expect the problem somewhere in nginx. so if u need more infos, please give me a sign. also when u have any idea what i can do/test to get this problem away. currently i dont have any idea left. thx peter
Replies
0
Boosts
0
Views
661
Activity
Feb ’23
The class AudioFileResource of RealityKit can not play audio
I am using RealitKit SDK to insert audio into the AR program. According to the description on the official website, I need to use the class AudioFileResource to load audio, and then the Entity object calls the prepareAudio() method to get an AudioPlaybackController, which is used to play audio, but there is no sound. Has anyone ever encountered this situation?
Replies
0
Boosts
0
Views
621
Activity
Feb ’23
IOS 16.1.1 Automatic resume playback
When playing music or a podcast in the Spotify application (as well as using car play), an audio notification may occur from the Waze application, after the notification, playback in the Spotify application usually continues automatically. Well, the new update does not work properly to automatically resume listening, you need to press play again in the Spotify app. Please fix it, it's very annoying.
Replies
1
Boosts
2
Views
2.1k
Activity
Feb ’23
indexOfNowPlayingItem Bug in iOS 16.4 Beta 1
In iOS 16.4 Beta 1, the indexOfNowPlayingItem returns unexpected/incorrect value. In prior versions of iOS, the value returned was expected. I also plan on submitting a detailed bug report on Feedback Assistant once I have more details.
Replies
1
Boosts
0
Views
779
Activity
Feb ’23
Preload AVAsset
I have to make sure that I have fully loaded the videos before playing them. I went through the Apple documentation but couldn't find how to do it. I tried AVAssetDownloadTask but I don't want to keep the files. I want them to be deleted after the app is closed. Is there a recommended method for this? I need to make sure the videos are fully downloaded and ready to play. So AVPlayer's default behavior doesn't work for me
Replies
0
Boosts
1
Views
878
Activity
Feb ’23
Apple CarPlay Issue
Hello everyone, Apple CarPlay is implemented in one of my applications by using MediaPlayer Framework. It is working properly if iPhone is locked, the App is in the background, or in an Active state. But I want to play audio from CarPlay even if the App is in a terminated state similar to Spotify app does. In case of application is not opened in the phone, on CarPlay display selecting the station does not play the song. You can see in the below videos for both cases: [https://algoworks-my.sharepoint.com/:v:/p/ankit_singh/EQ3HzSKEl-pGpMIK0vh7HIkBtWg50-vco3aTyxOZevmuTA?e=2pmmWB) [https://algoworks-my.sharepoint.com/:v:/p/ankit_singh/EeI8qai1iftKvwo9nogCJREBFQXCf3qf8d-qwIt-25CB7g?e=bkYqAH) I tried many things but not able to achieve this. So help me with this and share some code to review. Thanks.
Replies
0
Boosts
0
Views
1.1k
Activity
Feb ’23
Making a task while phone is locked works on simulator, but not on physical device
I am working on an app that makes a custom alarm so I am using long music from outsourced platforms like Spotify, everything is done but the current issue is when I try to play the music when the phone is locked it doesn't work on a physical device but works on the simulator!, what I am doing is schedule a local notification to turn on the screen at this time then play the music from a scheduled timer. Here is the snippet of the code responsible for this. let timer = Timer(timeInterval: time.timeIntervalSinceNow, repeats: false) { timer in // Doing the task here! playAlarm() } RunLoop.current.add(timer, forMode: .common) Note: To run this task when the phone is locked I am sending a local notification at this time to turn on the screen to make it possible to run this task. Please let me know if this is possible as I see some apps doing this
Replies
0
Boosts
0
Views
776
Activity
Jan ’23