AirPlay allows users to wirelessly stream content from their iOS device or Mac to devices and accessories compatible with AirPlay.

Posts under AirPlay tag

109 Posts

Post

Replies

Boosts

Views

Activity

Airplay device name
Is there any way of discovering the name of the device when the user started to cast to it? The only thing I found was this let route = AVAudioSession.sharedInstance().currentRoute for output in route.outputs where output.portType == .airPlay { infoDict["deviceName"] = output.portName infoDict["portType"] = output.portType.rawValue } but the output.portName returns the portType instead of the portName.
1
1
1.5k
Jan ’22
How to send subtitles vtt when AirPlay a mp4?
Target is view html subtitles in vtt format in TV when AirPlay is running from: <video preload="metadata" x-webkit-airplay="allow" src="a.mp4"> <track kind="subtitles" default="" src="en.vtt" srclang="en"> <track kind="subtitles" src="de.vtt" srclang="de"> <track kind="subtitles" src="es.vtt" srclang="es"> <track kind="subtitles" src="fr.vtt" srclang="fr"> </video> The problem is when AirPlay is enabled video and audio plays on TV, but no subtitles showed. I tryied to include vtt/srt subtitles into the mp4 metadata with ffmpeg and subtitles working with VLC but not working when AirPlay this files. ffmpeg -i 8499.mp4 -i 8499.en.vtt -map 0:v -map 0:a -c copy -map 1 -c:s:0 mov_text -metadata:s:s:0 language=en 8499.en.mp4 ffmpeg -i 8499.mp4 -i 8499.en.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 srt -metadata:s:s:0 language=en 8499.en.mp4 Also tried to send a .m3u8 with no luck. Any of you know how is the basic format for a simple .m3u8 with a .mp4 and .vtt working when AirPlay? Wich is the standard subtitles solution for AirPlay?
0
0
1.4k
Jan ’22
WiFi Bridging on iPhones
Hi, I'm looking to understand more about the options available to hardware/software developers who are seeking to connect WiFi device to iOS devices in a bridging-type arrangement. For example. we are considering connecting one of our devices to an iPhone while maintaining access to the WiFi Network (WLAN) to enable data transfer to a server. Cellular data connections aren't an option. We are open to MFi. Thanks very much.
0
0
905
Dec ’21
Signed URLs and Airplay from iOS
I have a video player that streams URLs coming from AWS using a signed cookie method. This works fine when streaming locally on the device, but does not work when attempting to AirPlay. I understand the reason why this is failing due to the AirPlay device not receiving the cookie. Is there a way to pass the cookie along with the AirPlay request? Are there other methods available to accomplish streaming via signed URLs?
0
1
570
Dec ’21
get AirPlay Mirroring Log in iPhone/iPad
We Organization use iPad Air 2 (OS Ver.13.* ~ 14.*). If first contact Apple TV then This iPad can AirPlay Mirroring on a AppleTV 3rd, But, Next time, Any iPad can not AirPlay Mirroring on a AppleTV 3rd(OS Ver.7.8). AP used Aironet 1852i (Cisco Systems). So, We hope to view log into a AirPlay in a any iPad used App. Tell us viewer App for AirPlay logs, Please.
0
0
650
Nov ’21
Identify the name of the AirPlay device for accessibility
Hello, I'm trying to identify the name of the device when AirPlay is active. I would like to use the name for VoiceOver. With the snippet below, all I'm getting is "AirPlay". Here is a snippet: var externalDeviceName: String { let currentRoute = AVAudioSession.sharedInstance().currentRoute var port: String? for output in currentRoute.outputs where output.portType == AVAudioSession.Port.airPlay { port = output.portName } return port ?? "unknown" } Is getting the device name no possible? Or am I just doing it wrong? Thanks!
0
0
760
Nov ’21
Neighbor Awareness Networking
Hello, I would like to develop an app that makes uses of WiFi-Neighbor Awareness Networking (NAN) which connects to an IOT device that i'm building to transfer files from IOS device to the IOT device back and forth. Is there a documentation on how to make use of NAN in IOS? It would be similar to AirPlay or AirDrop. Thanks, Venkee
0
0
1.6k
Nov ’21
Paused AirPlay video jumps to start when resumed on Apple TV
Hello, were are facing an issue where the following steps lead to playback jumping back to the start:Pause video part way through on iOS deviceInitiate AirPlay to an Apple TV while the video is pausedUse the Apple TV remote to try and resume the video using the play/pause buttonAt step 2, a stillframe of the correct point in the video is displayed, but on pressing play the playback restarts from the beginning. However it does resume from the correct place if you instead press play on the iOS device.Other apps also seem to exhibit this behaviour (e.g. YouTube) so looks like might be some sort of standard AirPlay behaviour.Is anybody familiar with this issue?
2
0
2.7k
Oct ’21
Help with crash in framework code - freeing completion blocks?
Hello. I have a mysterious crash that I can't reproduce. The stack traces never have any of my code in them. Here is what I know about the crashes: It doesn't seem to be at all device-specific, but newer devices are far more commonly seen than older devices. It only happens on iOS 14 and up It might possibly be related to airplay (I work on a video player app), because every crash report also has either a thread labeled com.apple.coremedia.displaymirroringobserver or a thread labeled AVAudioSession Notify Thread Here is the stack trace: language Crashed: com.apple.main-thread  EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000020 0 libobjc.A.dylib 0x1bfa07de0 objc_release + 16 1 libsystem_blocks.dylib 0x1f315d784 _Block_release + 188 2 UIKitCore 0x1ae37bf14 -[_UIAfterCACommitBlock run] + 76 3 UIKitCore 0x1adee1984 _runAfterCACommitDeferredBlocks + 296 4 UIKitCore 0x1aded0eb4 _cleanUpAfterCAFlushAndRunDeferredBlocks + 200 5 UIKitCore 0x1adf02484 _afterCACommitHandler + 76 6 CoreFoundation 0x1ab5e687c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 7 CoreFoundation 0x1ab5e0f50 __CFRunLoopDoObservers + 604 8 CoreFoundation 0x1ab5e1498 __CFRunLoopRun + 960 9 CoreFoundation 0x1ab5e0ba0 CFRunLoopRunSpecific + 572 10 GraphicsServices 0x1c2346598 GSEventRunModal + 160 11 UIKitCore 0x1aded22f4 -[UIApplication _run] + 1052 12 UIKitCore 0x1aded7874 UIApplicationMain + 164 13 SpectrumTV 0x1029874d0 main + 29 (SettingsAboutAnalyticsReporter.swift:29) 14 libdyld.dylib 0x1ab2bf568 start + 4 This seems to indicate that we are doing something wrong with a Core Animation completion block. When the OS tries to free the completion blocks, it crashes. But, that still leaves me with a huge search surface area, so I was hoping that by posting here, someone (perhaps someone with knowledge of the code in question) could point me at specifically what causes the above framework code to run. The other option is that someone is corrupting the heap, which is too horrifying to contemplate. 😱
5
0
4.4k
Oct ’21
Calling replaceCurrentItem(with:) method not working after an error occurs on AirPlay
Hello, My problem is quite complex, so I am going to describe it in detail below. I am developing a playback app that makes use of HLS streaming. One of the requirements I have to meet is that my app should react to HTTP response headers. As there is no API to get these information, I applied the solution described in the latest comment right here: HTTP Response Header from AVPlayer – I am using a proxy server to extract the headers from the response. The problem happens when a user wants to stream video on an external device via AirPlay. Since the proxy server runs only on a mobile device, any HTTP request fails on the external device due to an incorrect URL (e.g http://127.0.0.1:58244/theRestOfUrl/playlist.m3u8). In this case, I detect when the AirPlay connection is initiated (via the Notification Center mechanism), and then change AVPlayerItem by calling the replaceCurrentItem(with:) method. The new item contains a correct URL, without the proxy server address added. Everything works fine on AirPlay 2, but unfortunately not on older AirPlay – the player on the external device displays an activity indicator for a moment and after a while the connection is being interrupted. As a workaround, I tried to set nil on AVPlayer and create a new instance of it, but this does not work either. I can attach the sample project if needed. Best regards, Tomasz
1
0
1.5k
Oct ’21
Apple Tv 4k + AirPlay + AppleRemote
I am trying to AirPlay video from Firefox browser on iPad to the Apple Tv 4k, it plays fine, but if I pause with the Apple Remote while the ipad’s screen is off, it brings me to the Apple Tv home screen. If i pause while the screen is open, it pauses. why is this an issue with the screen being off?
Replies
0
Boosts
0
Views
1.3k
Activity
Feb ’22
Sidecar option missing on my macbook pro 2021
I want to use my ipad 9 as a second display for my macbook pro 2021 and I am missing the sidecar option on my mac. What can I do to connect the two.
Replies
0
Boosts
0
Views
816
Activity
Jan ’22
Port 7000
Why does apple use such a common port like 7000 for airplay? VEX Tournament Manager uses the same port so I cannot airplay and use TM both at the same time.
Replies
0
Boosts
0
Views
1.3k
Activity
Jan ’22
Airplay device name
Is there any way of discovering the name of the device when the user started to cast to it? The only thing I found was this let route = AVAudioSession.sharedInstance().currentRoute for output in route.outputs where output.portType == .airPlay { infoDict["deviceName"] = output.portName infoDict["portType"] = output.portType.rawValue } but the output.portName returns the portType instead of the portName.
Replies
1
Boosts
1
Views
1.5k
Activity
Jan ’22
How to send subtitles vtt when AirPlay a mp4?
Target is view html subtitles in vtt format in TV when AirPlay is running from: <video preload="metadata" x-webkit-airplay="allow" src="a.mp4"> <track kind="subtitles" default="" src="en.vtt" srclang="en"> <track kind="subtitles" src="de.vtt" srclang="de"> <track kind="subtitles" src="es.vtt" srclang="es"> <track kind="subtitles" src="fr.vtt" srclang="fr"> </video> The problem is when AirPlay is enabled video and audio plays on TV, but no subtitles showed. I tryied to include vtt/srt subtitles into the mp4 metadata with ffmpeg and subtitles working with VLC but not working when AirPlay this files. ffmpeg -i 8499.mp4 -i 8499.en.vtt -map 0:v -map 0:a -c copy -map 1 -c:s:0 mov_text -metadata:s:s:0 language=en 8499.en.mp4 ffmpeg -i 8499.mp4 -i 8499.en.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 srt -metadata:s:s:0 language=en 8499.en.mp4 Also tried to send a .m3u8 with no luck. Any of you know how is the basic format for a simple .m3u8 with a .mp4 and .vtt working when AirPlay? Wich is the standard subtitles solution for AirPlay?
Replies
0
Boosts
0
Views
1.4k
Activity
Jan ’22
NSNetService deprecated
With NSNetService deprecated, how to write an IOS app to use Airplay as a server (receiver)? I can't find any details on how to do that using the Network framework which apparently replaces NSNetService.
Replies
0
Boosts
0
Views
778
Activity
Jan ’22
tvOS14 Audio Output Sources Missing
tvOS14 has no option to choose an output source so No Airplay to homepods. Has the Option moved or been removed from this version? I see nothing about it in the release notes
Replies
38
Boosts
0
Views
20k
Activity
Dec ’21
WiFi Bridging on iPhones
Hi, I'm looking to understand more about the options available to hardware/software developers who are seeking to connect WiFi device to iOS devices in a bridging-type arrangement. For example. we are considering connecting one of our devices to an iPhone while maintaining access to the WiFi Network (WLAN) to enable data transfer to a server. Cellular data connections aren't an option. We are open to MFi. Thanks very much.
Replies
0
Boosts
0
Views
905
Activity
Dec ’21
Signed URLs and Airplay from iOS
I have a video player that streams URLs coming from AWS using a signed cookie method. This works fine when streaming locally on the device, but does not work when attempting to AirPlay. I understand the reason why this is failing due to the AirPlay device not receiving the cookie. Is there a way to pass the cookie along with the AirPlay request? Are there other methods available to accomplish streaming via signed URLs?
Replies
0
Boosts
1
Views
570
Activity
Dec ’21
Share Audio Feature w/ Bluetooth
I think this is a really awesome feature however I feel like it’s missing something. I think it would be really cool if you could talk to the person you are sharing Audio with through your AirPods.
Replies
0
Boosts
0
Views
481
Activity
Dec ’21
get AirPlay Mirroring Log in iPhone/iPad
We Organization use iPad Air 2 (OS Ver.13.* ~ 14.*). If first contact Apple TV then This iPad can AirPlay Mirroring on a AppleTV 3rd, But, Next time, Any iPad can not AirPlay Mirroring on a AppleTV 3rd(OS Ver.7.8). AP used Aironet 1852i (Cisco Systems). So, We hope to view log into a AirPlay in a any iPad used App. Tell us viewer App for AirPlay logs, Please.
Replies
0
Boosts
0
Views
650
Activity
Nov ’21
Identify the name of the AirPlay device for accessibility
Hello, I'm trying to identify the name of the device when AirPlay is active. I would like to use the name for VoiceOver. With the snippet below, all I'm getting is "AirPlay". Here is a snippet: var externalDeviceName: String { let currentRoute = AVAudioSession.sharedInstance().currentRoute var port: String? for output in currentRoute.outputs where output.portType == AVAudioSession.Port.airPlay { port = output.portName } return port ?? "unknown" } Is getting the device name no possible? Or am I just doing it wrong? Thanks!
Replies
0
Boosts
0
Views
760
Activity
Nov ’21
Neighbor Awareness Networking
Hello, I would like to develop an app that makes uses of WiFi-Neighbor Awareness Networking (NAN) which connects to an IOT device that i'm building to transfer files from IOS device to the IOT device back and forth. Is there a documentation on how to make use of NAN in IOS? It would be similar to AirPlay or AirDrop. Thanks, Venkee
Replies
0
Boosts
0
Views
1.6k
Activity
Nov ’21
iOS client access airplay device
Does the client app developer need any special entitlement for that ?
Replies
1
Boosts
0
Views
897
Activity
Oct ’21
Is AVRouteDetector broken in iOS 13.6 ?
I'm seeing AVRouteDetector report multipleRoutesDetected == true when there are no AirPlay devices on the network. Is this a bug?
Replies
5
Boosts
0
Views
1.4k
Activity
Oct ’21
Paused AirPlay video jumps to start when resumed on Apple TV
Hello, were are facing an issue where the following steps lead to playback jumping back to the start:Pause video part way through on iOS deviceInitiate AirPlay to an Apple TV while the video is pausedUse the Apple TV remote to try and resume the video using the play/pause buttonAt step 2, a stillframe of the correct point in the video is displayed, but on pressing play the playback restarts from the beginning. However it does resume from the correct place if you instead press play on the iOS device.Other apps also seem to exhibit this behaviour (e.g. YouTube) so looks like might be some sort of standard AirPlay behaviour.Is anybody familiar with this issue?
Replies
2
Boosts
0
Views
2.7k
Activity
Oct ’21
TVOS 15 AirPlay Problem
Hi, after an automatic update to my AT4, my airplay speakers (airport express + Ampli) is not working properly now. Bad synchro between vidéo and sound. Trying to set that in the settings but it doesn’t work. anybody has the same problem?
Replies
0
Boosts
0
Views
532
Activity
Oct ’21
tvOS 15 Beta 3 issues with Airplay speakers
After updating to tvOS15 Beta 3, Apple TV is not connecting to Airplay speakers anymore. Though, connecting HomePod minis are ok. Anyone else noticed this? Thanks!
Replies
3
Boosts
0
Views
2k
Activity
Oct ’21
Help with crash in framework code - freeing completion blocks?
Hello. I have a mysterious crash that I can't reproduce. The stack traces never have any of my code in them. Here is what I know about the crashes: It doesn't seem to be at all device-specific, but newer devices are far more commonly seen than older devices. It only happens on iOS 14 and up It might possibly be related to airplay (I work on a video player app), because every crash report also has either a thread labeled com.apple.coremedia.displaymirroringobserver or a thread labeled AVAudioSession Notify Thread Here is the stack trace: language Crashed: com.apple.main-thread  EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000020 0 libobjc.A.dylib 0x1bfa07de0 objc_release + 16 1 libsystem_blocks.dylib 0x1f315d784 _Block_release + 188 2 UIKitCore 0x1ae37bf14 -[_UIAfterCACommitBlock run] + 76 3 UIKitCore 0x1adee1984 _runAfterCACommitDeferredBlocks + 296 4 UIKitCore 0x1aded0eb4 _cleanUpAfterCAFlushAndRunDeferredBlocks + 200 5 UIKitCore 0x1adf02484 _afterCACommitHandler + 76 6 CoreFoundation 0x1ab5e687c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 7 CoreFoundation 0x1ab5e0f50 __CFRunLoopDoObservers + 604 8 CoreFoundation 0x1ab5e1498 __CFRunLoopRun + 960 9 CoreFoundation 0x1ab5e0ba0 CFRunLoopRunSpecific + 572 10 GraphicsServices 0x1c2346598 GSEventRunModal + 160 11 UIKitCore 0x1aded22f4 -[UIApplication _run] + 1052 12 UIKitCore 0x1aded7874 UIApplicationMain + 164 13 SpectrumTV 0x1029874d0 main + 29 (SettingsAboutAnalyticsReporter.swift:29) 14 libdyld.dylib 0x1ab2bf568 start + 4 This seems to indicate that we are doing something wrong with a Core Animation completion block. When the OS tries to free the completion blocks, it crashes. But, that still leaves me with a huge search surface area, so I was hoping that by posting here, someone (perhaps someone with knowledge of the code in question) could point me at specifically what causes the above framework code to run. The other option is that someone is corrupting the heap, which is too horrifying to contemplate. 😱
Replies
5
Boosts
0
Views
4.4k
Activity
Oct ’21
Calling replaceCurrentItem(with:) method not working after an error occurs on AirPlay
Hello, My problem is quite complex, so I am going to describe it in detail below. I am developing a playback app that makes use of HLS streaming. One of the requirements I have to meet is that my app should react to HTTP response headers. As there is no API to get these information, I applied the solution described in the latest comment right here: HTTP Response Header from AVPlayer – I am using a proxy server to extract the headers from the response. The problem happens when a user wants to stream video on an external device via AirPlay. Since the proxy server runs only on a mobile device, any HTTP request fails on the external device due to an incorrect URL (e.g http://127.0.0.1:58244/theRestOfUrl/playlist.m3u8). In this case, I detect when the AirPlay connection is initiated (via the Notification Center mechanism), and then change AVPlayerItem by calling the replaceCurrentItem(with:) method. The new item contains a correct URL, without the proxy server address added. Everything works fine on AirPlay 2, but unfortunately not on older AirPlay – the player on the external device displays an activity indicator for a moment and after a while the connection is being interrupted. As a workaround, I tried to set nil on AVPlayer and create a new instance of it, but this does not work either. I can attach the sample project if needed. Best regards, Tomasz
Replies
1
Boosts
0
Views
1.5k
Activity
Oct ’21