AirPlay 2

RSS for tag

AirPlay 2 allows users to wirelessly send content from any Apple device to a device enabled with AirPlay.

Posts under AirPlay 2 tag

71 Posts

Post

Replies

Boosts

Views

Activity

How to play Encrypted HLS m3u8 url via Airplay using avplayer.
I have an avplayer with an encrypted m3u8 url and this is my code snippet let contentUrl = URL(string: String(format:videoUrl)) let headers = ["token": token] let asset: AVURLAsset = AVURLAsset(url: contentUrl!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers]) let playerItem: AVPlayerItem = AVPlayerItem(asset: asset) self.avPlayer?.replaceCurrentItem(with: playerItem) self.avPlayer?.play() When i try to stream Airplay the content not displaying. Airplay is not working with an encrypted url. How can i stream? Is there any way.
0
0
1.1k
May ’24
iOS connecting to a AirPlay display
I want to present content from my iOS app to a display (ie SmartTV) via AirPlay. I've searched the Apple doc and have done Google searches, but I can't find any decent examples of how to get started with connecting to a remote display. Everything seems to be either out of date or too small a snippet to be of use (no context as to where the snippet might go in your code). Can someone please show me how to connect my SwiftUI app to a remote display? It would be greatly appreciated.
0
1
904
Oct ’23
Can't set Album artwork on MPNowPlayingInfoCenter without setting allowsExternalPlayback = false
I have an AVPlayerViewController in my app to play custom audio+image or video streamed from an online service. If I set the below, I am able to add info to the nowPlayingInfo dictionary avplayerController.updatesNowPlayingInfoCenter = false This works for iOS control centre, it correctly displays my custom album name, artwork etc. But when using airplay for audio, it only displays the track name while playing audio. It doesn't display the artwork or the album etc. However if I set avplayerController.player?.allowsExternalPlayback = false It does correctly display artwork, title, album etc. This however disables the airplay button thats inbuilt on the player. I would like this button to remain, but need the artwork to be displayed while airplay-ing. How to I achieve this?
0
1
1.1k
Oct ’23
AirPlay with AVPlayer/MPNowPlayingInfoCenter doesn't show album art on device
I'm developing a media player for Mac (AppKit, not Catalyst) that plays local and remote content. I have AirPlay working with AVPlayer (with an AVRoutePickerView assigning the route), but while I get the metadata that I've set for the MPNowPlayingInfoCenter on the AirPlay device (a TV in this case), I don't get any album art (but I do in the macOS now playing menu bar/control centre applet). It looks like this: (imgur link because I can't get it to upload in the forum): https://i.imgur.com/2JBIYCw.jpg My code for setting the metadata:         NSImage *artwork = [currentTrack coverImage];         CGSize artworkSize = [artwork size];         MPMediaItemArtwork *mpArtwork = [[MPMediaItemArtwork alloc] initWithBoundsSize:artworkSize requestHandler:^NSImage * _Nonnull(CGSize size) {             return artwork;         }];         [songInfo setObject: mpArtwork forKey:MPMediaItemPropertyArtwork]; I noticed that it doesn't resize, but it seems at least macOS doesn't care. I tried modifying the code to resize the artwork in the callback, but that also doesn't change anything. I noticed in the logs that I get a message about a missing entitlement: 2023-01-29 14:00:37.889346-0400 Submariner[42682:9794531] [Entitlements] MSVEntitlementUtilities - Process Submariner PID[42682] - Group: (null) - Entitlement: com.apple.mediaremote.external-artwork-validation - Entitled: NO - Error: (null) ...however, this seems to be a private entitlement and the only reference I can find to it is WebKit. Using it makes LaunchServices very angry at me, and I presume it's a red herring.
3
1
3.2k
Oct ’23
mDNSResponder failing Bonjour Conformance Test
I'm using the following: mDNSResponder 1790.80.10 Bonjour Conformance Test (BCT) 1.5.2 Linux 6.1.y kernel I'm testing an Airplay 2 speaker as part of our self certification. When BCT gets into the mDNS tests mDNSResponder fails the subsequent conflict test with this message: ERROR 2023-06-12 10:37:29.398711-0500 _sub_conflict 03570: Device did not complete its probing sequence for a new name after a subsequent conflict arose for its previously acquired name. BCT then retries three times with each retry failing with the same message. Am I missing something from my software that interacts with the mdns daemon? Is this a known issue with the posix build for mDNSResponder? What can I do to get this test to pass? Any help would be appreciated. Ethan
5
0
2.8k
Oct ’23
Playback position set to 0 when switch between local and external playback
When playing an HLS/FairPlay VOD content, the playback position sometimes jumps to 0 during the transition between local and external playback (and the other way around). The app does nothing during the transition, apart from responding to ContentKeySession key requests. It is not systematic but occurs quite often. When the issue occurs, the playback sometimes resumes to the position where it was before the transition but usually it does not. Most of the time, when the issue occur, the iOS app periodic time observer gets triggered and the AVPlayerItem currentTime() has the specific value 0.001s. Here is an extract of our iOS app logs with the value of AVPlayerItem.currentTime() when the AVPlayer PeriodicTimeObserver is triggered: 📘 [8:21:54.520] Did update playback time: 4512.001719539 📘 [8:21:55.472] Did update playback time: 4512.958677777778 📗 [8:21:55.497] Player external playback active changed to: true 📘 [8:21:57.674] Did update playback time: 4512.001897709 📘 [8:21:57.779] Did update playback time: 4511.974062125 📘 [8:21:57.800] Did update playback time: 4511.995523418 📘 [8:21:57.805] Did update playback time: 4512.001181626 📘 [8:21:58.806] Did update playback time: 4513.001841876 📘 [8:21:59.794] Did update playback time: 4514.001132625 📘 [8:22:00.795] Did update playback time: 4515.001653707 📘 [8:22:01.562] Did update playback time: 4515.766148708 📗 [8:22:01.679] Player external playback active changed to: false 📘 [8:22:01.683] Did update playback time: 0.001 📘 [8:22:01.700] Did update playback time: 4510.0 📘 [8:22:01.737] Did update playback time: 4510.0 📘 [8:22:01.988] Did update playback time: 4509.956132376 📘 [8:22:01.990] Did update playback time: 4509.958216834 📘 [8:22:03.033] Did update playback time: 4511.0015079 📘 [8:22:04.033] Did update playback time: 4512.001688753 📘 [8:22:05.033] Did update playback time: 4513.001998495 📘 [8:22:06.033] Did update playback time: 4514.001205557 📘 [8:22:06.045] Did update playback time: 4514.0325555555555 📗 [8:22:06.080] Player external playback active changed to: true 📘 [8:22:06.800] Did update playback time: 0.0 📘 [8:22:06.814] Did update playback time: 0.0 📘 [8:22:08.168] Did update playback time: 0.002258708 📘 [8:22:08.218] Did update playback time: -0.075460416 📘 [8:22:08.237] Did update playback time: -0.063310916 📘 [8:22:09.298] Did update playback time: 1.001932292 📘 [8:22:10.295] Did update playback time: 2.003054584 📘 [8:22:11.302] Did update playback time: 3.001831125 📘 [8:22:12.301] Did update playback time: 4.001488001 Local -> AirPlay: no issue AirPlay -> Local: the issue occurs temporarily and the playback approximately returns to its position before the transition Local -> AirPlay: the issue occurs permanently and the playback continues from the beginning of the stream. I've filed a feedback for this issue with both iOS device and AppleTV sysdiagnoses: https://feedbackassistant.apple.com/feedback/11990309
1
2
1.6k
Oct ’23
No metadata displayed on AppleTV while AirPlaying
During the video playback with the AVPlayer, our iOS and AppleTV apps set AVPlayerItem externalMetadata. Additionaly, the iOS app also sets the default MPNowPlayingInfoCenter nowPlayingInfo. The apps also register to MPRemoteCommands. What works: The iOS NowPlayingInfo center is properly filled with the metadata, the remote commands work well and on AppleTV, using the AVPlayerViewController, the info tab shows the content metadata. Problem: when AirPlaying the content to an AppleTV, the stream is properly played but no metadata are displayed on the AppleTV. I've tried to set nowPlayingInfo on the avPlayerItem or using an MPNowPlayingSession (new with iOS/tvOS 16) but with no luck. Can someone help me display the playerItem metadata on the AirPlay device?
1
1
1.6k
Aug ’23
iOS 17 Beta: AVSampleBufferVideoRenderer, can it be used with AirPlay?
In iOS 17 Beta, a new AVSampleBufferVideoRenderer class has been added: https://developer.apple.com/documentation/avfoundation/avsamplebuffervideorenderer I'm wondering if this could somehow be used together with AirPlay in order to manually enqueue video sample buffers, just like you already can for AirPlay Audio with AVSampleBufferAudioRenderer (see: https://developer.apple.com/documentation/avfaudio/audio_engine/playing_custom_audio_with_your_own_player). I want to be able to stream AirPlay Video without HLS. If I try to add the video renderer to their existing sample project for audio I get exception with message: "... video target must be added to the AVSampleBufferVideoRenderer prior to enqueueing sample buffers.", which I guess makes sense. But since there is no documentation on this yet, I can't know how to add a video target, nor what kind of video targets are supported.
0
0
1.2k
Jul ’23
HomeKit Accessories list does not include some devices shown in the Home app
I'm attempting to control a television (an recent LGTV) via HomeKit. When I scan all of the accessories (through HMHome.accessories, and also by querying each room separately) most of my devices show up -- but not my TVs or Apple TVs, and a couple of other things like an AVR. These devices show up on my Home app, assigned to specific rooms, and I can use that app and Shortcuts, to control the TV. Is there any way to find these devices through the HomeKit API? Or are there other APIs which I need to use for them, perhaps AirPlay?
0
0
1.1k
Jul ’23
Airplay Video automation
Hi! I am trying to set up some tests on AppleTV and i figured the way to do them is by using airplay video. The issue here is i want the tests to be automatically executed and i don't seem to see any way to automatize airplay except for using applescript with quicktime player. I tried to write a script that could do that but i get the "wrong index" error. My code below: to replaceFrontQTPlayerWithFile(aFile) tell application "QuickTime Player" activate try set frontDoc to front document close front document on error err number errNum if errNum is -1719 then -- There is no open document else if errNum is -10000 then -- Front doc exists, but does not really... else log err end if end try open aFile tell application "System Events" to tell process "QuickTime Player" tell window 1 click button 4 delay 1 pick menu item "WRO-CT-IE-ATV-2" of menu 0 of button 4 end tell end tell play front document -- Hide QTP #tell application "System Events" # keystroke "h" using command down #end tell end tell end replaceFrontQTPlayerWithFile on run set unixFile to "/Users/aet/signals/roomba_sdr_vfr_no_audio.mov" set macFile to POSIX file unixFile set fileRef to (macFile as alias) my replaceFrontQTPlayerWithFile(fileRef) end run Here i have two questions: Is there any other way to do that (maybe some airplay API/command line tool that could help me)? If not is there a way to make my code work? I am using macOS 12 device with tvOS 16 AppleTV
0
0
1k
Jul ’23
AirPlay LAN dropouts
Since switching to a Mac Studio and updating to Ventura (13.2.1, but happened with earlier Ventura releases), Music's broadcasts to four wired AirPlay Yamaha WXA-50 receivers/amps are subject to occasional dropouts. I haven't been able to characterize when they occur (death for debugging...I know...). My best guess for now is that other processes are getting prioritized over Music's worker bees. But that's purely a guess. It seems the dropouts occur most frequently during the last few seconds of a track. But that could be observational bias. Mostly, I'm fishing for others who might have noticed similar behavior and might have some theories on what's going on. Any comments?
1
0
987
Mar ’23
Airplay 2 and device-local video files
Not sure when this started, but with iOS/iPadOS/tvOS 15, I cannot AirPlay a video file stored on my iOS/iPadOS device to an Apple TV using AVPlayer. Local audio files work fine and remote video files work fine. It's only local video files that fail to play. The error I get via a NSNotification.Name.AVPlayerItemFailedToPlayToEndTime notification is AVErrorExternalPlaybackNotSupportedForAsset. This is easily reproduced using the 'Integrating AirPlay for Long-Form Video Apps' sample app found here by adding a video file to the project and playing that rather that the m3u8 streams the sample uses by default: https://developer.apple.com/documentation/avfoundation/media_playback_and_selection/integrating_airplay_for_long-form_video_apps Happens with tvOS 15 & 15.1 Anyone else experiencing this issue?
2
1
2.5k
Mar ’23
Airplay: Airplay code to connect to "dumb" devices (Bose WiFi speaker in my case)
Hello, My iPhone 12 running iOS16.1.1 has been enroled in my company cell phone fleet. My company's IT have deploy VmWare AnyConnect tool. The company policy requests an Airplay code for any Airplay new connection from/to the iPhone: I succeeded with Apple TV the 4 digits AirPlay code (it was automatically displayed on my TV's screen), I'm failling to connect with my Bose SoundTouch 20 Serie III since enrolment in the company's phones fleet. I tried to sollicitate both Bose Technical support, then Apple support without success. In fact, when trying to pair via Airplay in between my iPhone and the SoundTouch device, the phone is requesting an "AirPlay Code" which I do not know, and never displayed on the Bose device screen... I guess Bose is missing some secured Airplay protocol features ... Any help would be welcome in between Apple Developpers and Bose developpers, as the Bose Technical support claims that they cannot log any ticket to Bose developper... If anybody can ring a bell at Bose... to solve this limitation. Best Regards
3
0
2.1k
Dec ’22
Airplay unable to differentiate between apple tv and sonos speakers
I have a bunch of sonos speakers, as well as an apple tv. The sonos attached to the TV are named the living room speakers and the Apple TV is called the living room Apple TV. When using AirPlay, it only seems to show and allow selection to stream audio to the “living room” Apple TV, not the living room sonos speakers. Other apps directly integrated with sonos can differentiate. This is a problem because if I want to stream to both kitchen and the living room, selecting the kitchen speakers directly and then the living room speakers via the Apple TV will create a noticeable audio time lag in the living room. To get around this I have to first stream to kitchen, then go into the sonos app and group the living room sonos speakers to the kitchen speakers to bypass the Apple TV. attaching screenshots of Spotify seeing the speakers directly but failing to using AirPlay. Also attaching pic of Apple Music failing to see them entirely as it relies just on AirPlay.
1
1
1.1k
Dec ’22
AVPlayerController AirPlay audio track and custom image
I have a URL to an Audio track and a URL to custom album artwork image. I'm trying to replicate what apple music does when airplaying, where it shows the image, album title, artist etc, on the other screen while playing the audio Using the AVPlayerController I can get the audio to play, and I can add the custom artwork to the contentOverlayView. But when I airplay, the contentOverlayView is not passed to the other screen, only the audio track I tried playing around with adding nowPlayingInfo on the playerItem, but that didn't do anything. How can I pass the image and other info along when the user clicks airplay on the AVPlayerController?
1
1
2.5k
Dec ’22
How to determine the device capabilities of an AirPlay target?
Is it possible to determine the device capabilities of an AirPlay target? AVRouteDetector exposes the available playback routes to us, however does not seem to provide any context into what the capabilities of each of the devices in the list is. For context, we work on a streaming app that would like to re-fetch the manifest for playback prior to initiating AirPlay. The reason for this being that the manifest we pull down for the iPhone (sending device) often does not match the capabilities of the TV (receiving device). For example, the iPhone may support HDR whereas the TV does not. It would be ideal to structure the manifest properly for the AirPlay device, to do so we need more info on the devices capabilities. Things like: A list of all supported device capabilities for hardware video decoding A list of all supported device capabilities for high dynamic range (HDR) video quality All supported device capabilities for sound encoding Screen width and height
0
0
1k
Oct ’22
While airplaying content receiving error "An unknown error occurred (-12269)"
I am trying to airplay content on Samsung TV UA50AUE70AKLXL, it has in-built Airplay 2. Whenever I try to play a video it shows a black screen and then after some time throws the below error. I have tried searching everywhere to find the root cause of the issue but am still unable to find any. Please help in determining what could be the root cause of the issue //Error Optional(-11870) Optional("AVFoundationErrorDomain") //Underlying error Optional("The operation could not be completed") Optional("An unknown error occurred (-12269)") What does -12269 signify?
2
0
1.5k
Oct ’22
How to play Encrypted HLS m3u8 url via Airplay using avplayer.
I have an avplayer with an encrypted m3u8 url and this is my code snippet let contentUrl = URL(string: String(format:videoUrl)) let headers = ["token": token] let asset: AVURLAsset = AVURLAsset(url: contentUrl!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers]) let playerItem: AVPlayerItem = AVPlayerItem(asset: asset) self.avPlayer?.replaceCurrentItem(with: playerItem) self.avPlayer?.play() When i try to stream Airplay the content not displaying. Airplay is not working with an encrypted url. How can i stream? Is there any way.
Replies
0
Boosts
0
Views
1.1k
Activity
May ’24
AirPlay Discovery Broker for LG procentric solution
Hello everyone, has anyone already managed to successfully deploy an "Airplay discovery broker"? LG documented the process via a simple diagram and referred me to the airplay APIs without further details... If anyone has already used this type of architecture, I would be happy to see an example!
Replies
0
Boosts
0
Views
1.3k
Activity
Mar ’24
Subtitles are not rendered when streamed via airplay
Hi, Subtitles are not rendered when streamed via airplay. Can you let us know what's the expectation here to render subtitle when contents are streamed via airplay.
Replies
0
Boosts
0
Views
855
Activity
Feb ’24
iOS connecting to a AirPlay display
I want to present content from my iOS app to a display (ie SmartTV) via AirPlay. I've searched the Apple doc and have done Google searches, but I can't find any decent examples of how to get started with connecting to a remote display. Everything seems to be either out of date or too small a snippet to be of use (no context as to where the snippet might go in your code). Can someone please show me how to connect my SwiftUI app to a remote display? It would be greatly appreciated.
Replies
0
Boosts
1
Views
904
Activity
Oct ’23
AVRoutePickerView doesn't show system route alert
Hello, I set a AVRoutePickerView in app, when I press the routePickerView, it shows nothing, I don't know what's wrong with my project. By the way, when I press MPVolumeView ,it can shows the system route alert picker. Anyone can help?
Replies
2
Boosts
0
Views
2.1k
Activity
Oct ’23
Can't set Album artwork on MPNowPlayingInfoCenter without setting allowsExternalPlayback = false
I have an AVPlayerViewController in my app to play custom audio+image or video streamed from an online service. If I set the below, I am able to add info to the nowPlayingInfo dictionary avplayerController.updatesNowPlayingInfoCenter = false This works for iOS control centre, it correctly displays my custom album name, artwork etc. But when using airplay for audio, it only displays the track name while playing audio. It doesn't display the artwork or the album etc. However if I set avplayerController.player?.allowsExternalPlayback = false It does correctly display artwork, title, album etc. This however disables the airplay button thats inbuilt on the player. I would like this button to remain, but need the artwork to be displayed while airplay-ing. How to I achieve this?
Replies
0
Boosts
1
Views
1.1k
Activity
Oct ’23
AirPlay with AVPlayer/MPNowPlayingInfoCenter doesn't show album art on device
I'm developing a media player for Mac (AppKit, not Catalyst) that plays local and remote content. I have AirPlay working with AVPlayer (with an AVRoutePickerView assigning the route), but while I get the metadata that I've set for the MPNowPlayingInfoCenter on the AirPlay device (a TV in this case), I don't get any album art (but I do in the macOS now playing menu bar/control centre applet). It looks like this: (imgur link because I can't get it to upload in the forum): https://i.imgur.com/2JBIYCw.jpg My code for setting the metadata:         NSImage *artwork = [currentTrack coverImage];         CGSize artworkSize = [artwork size];         MPMediaItemArtwork *mpArtwork = [[MPMediaItemArtwork alloc] initWithBoundsSize:artworkSize requestHandler:^NSImage * _Nonnull(CGSize size) {             return artwork;         }];         [songInfo setObject: mpArtwork forKey:MPMediaItemPropertyArtwork]; I noticed that it doesn't resize, but it seems at least macOS doesn't care. I tried modifying the code to resize the artwork in the callback, but that also doesn't change anything. I noticed in the logs that I get a message about a missing entitlement: 2023-01-29 14:00:37.889346-0400 Submariner[42682:9794531] [Entitlements] MSVEntitlementUtilities - Process Submariner PID[42682] - Group: (null) - Entitlement: com.apple.mediaremote.external-artwork-validation - Entitled: NO - Error: (null) ...however, this seems to be a private entitlement and the only reference I can find to it is WebKit. Using it makes LaunchServices very angry at me, and I presume it's a red herring.
Replies
3
Boosts
1
Views
3.2k
Activity
Oct ’23
mDNSResponder failing Bonjour Conformance Test
I'm using the following: mDNSResponder 1790.80.10 Bonjour Conformance Test (BCT) 1.5.2 Linux 6.1.y kernel I'm testing an Airplay 2 speaker as part of our self certification. When BCT gets into the mDNS tests mDNSResponder fails the subsequent conflict test with this message: ERROR 2023-06-12 10:37:29.398711-0500 _sub_conflict 03570: Device did not complete its probing sequence for a new name after a subsequent conflict arose for its previously acquired name. BCT then retries three times with each retry failing with the same message. Am I missing something from my software that interacts with the mdns daemon? Is this a known issue with the posix build for mDNSResponder? What can I do to get this test to pass? Any help would be appreciated. Ethan
Replies
5
Boosts
0
Views
2.8k
Activity
Oct ’23
Playback position set to 0 when switch between local and external playback
When playing an HLS/FairPlay VOD content, the playback position sometimes jumps to 0 during the transition between local and external playback (and the other way around). The app does nothing during the transition, apart from responding to ContentKeySession key requests. It is not systematic but occurs quite often. When the issue occurs, the playback sometimes resumes to the position where it was before the transition but usually it does not. Most of the time, when the issue occur, the iOS app periodic time observer gets triggered and the AVPlayerItem currentTime() has the specific value 0.001s. Here is an extract of our iOS app logs with the value of AVPlayerItem.currentTime() when the AVPlayer PeriodicTimeObserver is triggered: 📘 [8:21:54.520] Did update playback time: 4512.001719539 📘 [8:21:55.472] Did update playback time: 4512.958677777778 📗 [8:21:55.497] Player external playback active changed to: true 📘 [8:21:57.674] Did update playback time: 4512.001897709 📘 [8:21:57.779] Did update playback time: 4511.974062125 📘 [8:21:57.800] Did update playback time: 4511.995523418 📘 [8:21:57.805] Did update playback time: 4512.001181626 📘 [8:21:58.806] Did update playback time: 4513.001841876 📘 [8:21:59.794] Did update playback time: 4514.001132625 📘 [8:22:00.795] Did update playback time: 4515.001653707 📘 [8:22:01.562] Did update playback time: 4515.766148708 📗 [8:22:01.679] Player external playback active changed to: false 📘 [8:22:01.683] Did update playback time: 0.001 📘 [8:22:01.700] Did update playback time: 4510.0 📘 [8:22:01.737] Did update playback time: 4510.0 📘 [8:22:01.988] Did update playback time: 4509.956132376 📘 [8:22:01.990] Did update playback time: 4509.958216834 📘 [8:22:03.033] Did update playback time: 4511.0015079 📘 [8:22:04.033] Did update playback time: 4512.001688753 📘 [8:22:05.033] Did update playback time: 4513.001998495 📘 [8:22:06.033] Did update playback time: 4514.001205557 📘 [8:22:06.045] Did update playback time: 4514.0325555555555 📗 [8:22:06.080] Player external playback active changed to: true 📘 [8:22:06.800] Did update playback time: 0.0 📘 [8:22:06.814] Did update playback time: 0.0 📘 [8:22:08.168] Did update playback time: 0.002258708 📘 [8:22:08.218] Did update playback time: -0.075460416 📘 [8:22:08.237] Did update playback time: -0.063310916 📘 [8:22:09.298] Did update playback time: 1.001932292 📘 [8:22:10.295] Did update playback time: 2.003054584 📘 [8:22:11.302] Did update playback time: 3.001831125 📘 [8:22:12.301] Did update playback time: 4.001488001 Local -> AirPlay: no issue AirPlay -> Local: the issue occurs temporarily and the playback approximately returns to its position before the transition Local -> AirPlay: the issue occurs permanently and the playback continues from the beginning of the stream. I've filed a feedback for this issue with both iOS device and AppleTV sysdiagnoses: https://feedbackassistant.apple.com/feedback/11990309
Replies
1
Boosts
2
Views
1.6k
Activity
Oct ’23
No metadata displayed on AppleTV while AirPlaying
During the video playback with the AVPlayer, our iOS and AppleTV apps set AVPlayerItem externalMetadata. Additionaly, the iOS app also sets the default MPNowPlayingInfoCenter nowPlayingInfo. The apps also register to MPRemoteCommands. What works: The iOS NowPlayingInfo center is properly filled with the metadata, the remote commands work well and on AppleTV, using the AVPlayerViewController, the info tab shows the content metadata. Problem: when AirPlaying the content to an AppleTV, the stream is properly played but no metadata are displayed on the AppleTV. I've tried to set nowPlayingInfo on the avPlayerItem or using an MPNowPlayingSession (new with iOS/tvOS 16) but with no luck. Can someone help me display the playerItem metadata on the AirPlay device?
Replies
1
Boosts
1
Views
1.6k
Activity
Aug ’23
iOS 17 Beta: AVSampleBufferVideoRenderer, can it be used with AirPlay?
In iOS 17 Beta, a new AVSampleBufferVideoRenderer class has been added: https://developer.apple.com/documentation/avfoundation/avsamplebuffervideorenderer I'm wondering if this could somehow be used together with AirPlay in order to manually enqueue video sample buffers, just like you already can for AirPlay Audio with AVSampleBufferAudioRenderer (see: https://developer.apple.com/documentation/avfaudio/audio_engine/playing_custom_audio_with_your_own_player). I want to be able to stream AirPlay Video without HLS. If I try to add the video renderer to their existing sample project for audio I get exception with message: "... video target must be added to the AVSampleBufferVideoRenderer prior to enqueueing sample buffers.", which I guess makes sense. But since there is no documentation on this yet, I can't know how to add a video target, nor what kind of video targets are supported.
Replies
0
Boosts
0
Views
1.2k
Activity
Jul ’23
HomeKit Accessories list does not include some devices shown in the Home app
I'm attempting to control a television (an recent LGTV) via HomeKit. When I scan all of the accessories (through HMHome.accessories, and also by querying each room separately) most of my devices show up -- but not my TVs or Apple TVs, and a couple of other things like an AVR. These devices show up on my Home app, assigned to specific rooms, and I can use that app and Shortcuts, to control the TV. Is there any way to find these devices through the HomeKit API? Or are there other APIs which I need to use for them, perhaps AirPlay?
Replies
0
Boosts
0
Views
1.1k
Activity
Jul ’23
Airplay Video automation
Hi! I am trying to set up some tests on AppleTV and i figured the way to do them is by using airplay video. The issue here is i want the tests to be automatically executed and i don't seem to see any way to automatize airplay except for using applescript with quicktime player. I tried to write a script that could do that but i get the "wrong index" error. My code below: to replaceFrontQTPlayerWithFile(aFile) tell application "QuickTime Player" activate try set frontDoc to front document close front document on error err number errNum if errNum is -1719 then -- There is no open document else if errNum is -10000 then -- Front doc exists, but does not really... else log err end if end try open aFile tell application "System Events" to tell process "QuickTime Player" tell window 1 click button 4 delay 1 pick menu item "WRO-CT-IE-ATV-2" of menu 0 of button 4 end tell end tell play front document -- Hide QTP #tell application "System Events" # keystroke "h" using command down #end tell end tell end replaceFrontQTPlayerWithFile on run set unixFile to "/Users/aet/signals/roomba_sdr_vfr_no_audio.mov" set macFile to POSIX file unixFile set fileRef to (macFile as alias) my replaceFrontQTPlayerWithFile(fileRef) end run Here i have two questions: Is there any other way to do that (maybe some airplay API/command line tool that could help me)? If not is there a way to make my code work? I am using macOS 12 device with tvOS 16 AppleTV
Replies
0
Boosts
0
Views
1k
Activity
Jul ’23
AirPlay LAN dropouts
Since switching to a Mac Studio and updating to Ventura (13.2.1, but happened with earlier Ventura releases), Music's broadcasts to four wired AirPlay Yamaha WXA-50 receivers/amps are subject to occasional dropouts. I haven't been able to characterize when they occur (death for debugging...I know...). My best guess for now is that other processes are getting prioritized over Music's worker bees. But that's purely a guess. It seems the dropouts occur most frequently during the last few seconds of a track. But that could be observational bias. Mostly, I'm fishing for others who might have noticed similar behavior and might have some theories on what's going on. Any comments?
Replies
1
Boosts
0
Views
987
Activity
Mar ’23
Airplay 2 and device-local video files
Not sure when this started, but with iOS/iPadOS/tvOS 15, I cannot AirPlay a video file stored on my iOS/iPadOS device to an Apple TV using AVPlayer. Local audio files work fine and remote video files work fine. It's only local video files that fail to play. The error I get via a NSNotification.Name.AVPlayerItemFailedToPlayToEndTime notification is AVErrorExternalPlaybackNotSupportedForAsset. This is easily reproduced using the 'Integrating AirPlay for Long-Form Video Apps' sample app found here by adding a video file to the project and playing that rather that the m3u8 streams the sample uses by default: https://developer.apple.com/documentation/avfoundation/media_playback_and_selection/integrating_airplay_for_long-form_video_apps Happens with tvOS 15 & 15.1 Anyone else experiencing this issue?
Replies
2
Boosts
1
Views
2.5k
Activity
Mar ’23
Airplay: Airplay code to connect to "dumb" devices (Bose WiFi speaker in my case)
Hello, My iPhone 12 running iOS16.1.1 has been enroled in my company cell phone fleet. My company's IT have deploy VmWare AnyConnect tool. The company policy requests an Airplay code for any Airplay new connection from/to the iPhone: I succeeded with Apple TV the 4 digits AirPlay code (it was automatically displayed on my TV's screen), I'm failling to connect with my Bose SoundTouch 20 Serie III since enrolment in the company's phones fleet. I tried to sollicitate both Bose Technical support, then Apple support without success. In fact, when trying to pair via Airplay in between my iPhone and the SoundTouch device, the phone is requesting an "AirPlay Code" which I do not know, and never displayed on the Bose device screen... I guess Bose is missing some secured Airplay protocol features ... Any help would be welcome in between Apple Developpers and Bose developpers, as the Bose Technical support claims that they cannot log any ticket to Bose developper... If anybody can ring a bell at Bose... to solve this limitation. Best Regards
Replies
3
Boosts
0
Views
2.1k
Activity
Dec ’22
Airplay unable to differentiate between apple tv and sonos speakers
I have a bunch of sonos speakers, as well as an apple tv. The sonos attached to the TV are named the living room speakers and the Apple TV is called the living room Apple TV. When using AirPlay, it only seems to show and allow selection to stream audio to the “living room” Apple TV, not the living room sonos speakers. Other apps directly integrated with sonos can differentiate. This is a problem because if I want to stream to both kitchen and the living room, selecting the kitchen speakers directly and then the living room speakers via the Apple TV will create a noticeable audio time lag in the living room. To get around this I have to first stream to kitchen, then go into the sonos app and group the living room sonos speakers to the kitchen speakers to bypass the Apple TV. attaching screenshots of Spotify seeing the speakers directly but failing to using AirPlay. Also attaching pic of Apple Music failing to see them entirely as it relies just on AirPlay.
Replies
1
Boosts
1
Views
1.1k
Activity
Dec ’22
AVPlayerController AirPlay audio track and custom image
I have a URL to an Audio track and a URL to custom album artwork image. I'm trying to replicate what apple music does when airplaying, where it shows the image, album title, artist etc, on the other screen while playing the audio Using the AVPlayerController I can get the audio to play, and I can add the custom artwork to the contentOverlayView. But when I airplay, the contentOverlayView is not passed to the other screen, only the audio track I tried playing around with adding nowPlayingInfo on the playerItem, but that didn't do anything. How can I pass the image and other info along when the user clicks airplay on the AVPlayerController?
Replies
1
Boosts
1
Views
2.5k
Activity
Dec ’22
How to determine the device capabilities of an AirPlay target?
Is it possible to determine the device capabilities of an AirPlay target? AVRouteDetector exposes the available playback routes to us, however does not seem to provide any context into what the capabilities of each of the devices in the list is. For context, we work on a streaming app that would like to re-fetch the manifest for playback prior to initiating AirPlay. The reason for this being that the manifest we pull down for the iPhone (sending device) often does not match the capabilities of the TV (receiving device). For example, the iPhone may support HDR whereas the TV does not. It would be ideal to structure the manifest properly for the AirPlay device, to do so we need more info on the devices capabilities. Things like: A list of all supported device capabilities for hardware video decoding A list of all supported device capabilities for high dynamic range (HDR) video quality All supported device capabilities for sound encoding Screen width and height
Replies
0
Boosts
0
Views
1k
Activity
Oct ’22
While airplaying content receiving error "An unknown error occurred (-12269)"
I am trying to airplay content on Samsung TV UA50AUE70AKLXL, it has in-built Airplay 2. Whenever I try to play a video it shows a black screen and then after some time throws the below error. I have tried searching everywhere to find the root cause of the issue but am still unable to find any. Please help in determining what could be the root cause of the issue //Error Optional(-11870) Optional("AVFoundationErrorDomain") //Underlying error Optional("The operation could not be completed") Optional("An unknown error occurred (-12269)") What does -12269 signify?
Replies
2
Boosts
0
Views
1.5k
Activity
Oct ’22