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

AirPlay Documentation

Posts under AirPlay tag

43 Posts
Sort by:
Post not yet marked as solved
0 Replies
402 Views
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?
Posted
by skatehype.
Last updated
.
Post not yet marked as solved
0 Replies
239 Views
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.
Posted Last updated
.
Post not yet marked as solved
38 Replies
14k Views
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
Posted
by pacman.
Last updated
.
Post not yet marked as solved
0 Replies
300 Views
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.
Posted
by crshrd.
Last updated
.
Post not yet marked as solved
0 Replies
286 Views
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?
Posted
by sgdfgfhhh.
Last updated
.
Post not yet marked as solved
0 Replies
262 Views
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.
Posted
by rnada.
Last updated
.
Post not yet marked as solved
0 Replies
276 Views
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.
Posted
by top_notes.
Last updated
.
Post not yet marked as solved
0 Replies
340 Views
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!
Posted
by clint_m_.
Last updated
.
Post not yet marked as solved
0 Replies
394 Views
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
Posted
by venkee.
Last updated
.
Post not yet marked as solved
1 Replies
385 Views
Does the client app developer need any special entitlement for that ?
Posted
by stang.
Last updated
.
Post not yet marked as solved
2 Replies
1.1k Views
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?
Posted
by asfaulkn.
Last updated
.
Post not yet marked as solved
0 Replies
264 Views
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?
Posted
by Oki46.
Last updated
.
Post not yet marked as solved
5 Replies
1.2k Views
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. 😱
Posted
by ElFrijol.
Last updated
.
Post not yet marked as solved
1 Replies
721 Views
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
Posted Last updated
.
Post not yet marked as solved
0 Replies
304 Views
Since updating to Big Sur on my 2018 MBP I've had nothing but Music app issues, and the issues are far and wide (Missing Artwork, no Artwork Cache for my Apple TVs, and of course AirPlay from the Music app). However, after months of troubleshooting AirPlay issues with Music, I was finally able to determine that if I have EQ turned on, Music will not allow me to AirPlay to any of my Apple TVs. Interestingly, if I turn off EQ I can instantly AirPlay to any of my Apple TVs. Turning the EQ back on while AirPlaying to an Apple TV has no change to the sound, but once I stop AirPlaying, the EQ becomes effective on my MBP about 2 seconds after I stop AirPlaying (you can hear the tonal changes after the EQ enables itself again). Any suggestions??
Posted Last updated
.
Post not yet marked as solved
0 Replies
572 Views
Hello; not if the topic has already been treated (I have searched but I have not found anything) in practice I have a problem with my iphone 12 pro max with the beta 6 version of ios 15 (19A5325f); the problem specifically concerns the bluetooth that I always remain connected with my second generation airpods (but the same happens with my airpods pro). In practice, making a phone call automatically, the call switches to the airpods even with the case closed and often going to the airplay menu I have to click on the small radar type icon to see that the iphone is always connected with the airpods even with the case closed I repeat. I also notice the automatic switch because the music menu appears in the lockscren. I ask you kindly, am I doing something wrong with the settings or is it an ios 15 bug? Tell me what details you need to better understand the problem. Thank you
Posted
by slow73.
Last updated
.
Post not yet marked as solved
3 Replies
1.2k Views
Hello! I'm writing an app with a possibility to play HLS streams. I make a KVO subscription for AVPlayer.timeControlStatus to change the state of custom trickplay controls. When I switch the playback from the device to an AirPlay device (Apple TV 4K for instance), the KVO subscription is triggerred once with .paused state and then stops getting updates. However the playback is active on the AppleTV in the same time. Also I have a periodicTimeObserver with period of 1 sec and this observer continues getting triggered each second. But if I print out the timeControlState of the player inside this periodicObserver it stays .paused. It's more strange as periodicObserver should not be triggered when prayer is in .paused state. When I pause/play the playback using remote control of the Apple TV everything starts working as expected: AVPlayer.timeControlStatus updates begin trigger KVO observation, periodicObserver is being triggered only when playback is active and timeControlStatus is .paying. I tried to simulate it in the clean project and prepared the project that just presents an AVPlayerViewController that shows a video from the hardcoded URL. And all the issues are being reproduced in the same way in the clean project. Please, find the listing below. I've tested this behavior with iOS 12.3.1 and 14.3 iPhones and AplleTV 4K tvOS 14.4. Is something wrong with AVPlayer configuration or is it an expected behavior or an iOS bug? swift class ViewController: UIViewController {     private var player: AVPlayer?     private var obs: NSKeyValueObservation?     @IBAction func playVideo(_ sender: Any) {         guard let url = URL(string: "https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8") else {             return         }         player = AVPlayer(url: url)         player?.addPeriodicTimeObserver(             forInterval: CMTime(seconds: 1, preferredTimescale: 600),             queue: DispatchQueue.main         ) { [weak player] _ in             print("#$#$player timeControlStatus: \(player?.timeControlStatus.rawValue)")         }         obs = player?.observe(\AVPlayer.timeControlStatus) { player, _ in             print("#$#$timeControlStatus changed to: \(player.timeControlStatus.rawValue)")         }         let controller = AVPlayerViewController()         controller.player = player         present(controller, animated: true) {             self.player?.play()         }     } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
715 Views
My boyfriend and I both have MacBook Pros. He's still using Catalina and has no issues. I updated to Big Sur 11.2.2 (20D80) and I cannot use the airplay feature on our LG smart TV (UN7240PVG). One of a few things happen: I go to Display under System preferences and select the TV. It selects it for a moment and the selection reverts back to the "Off" option. Then a pop-up appears saying the connection fails. Sometimes it does connect through the above way, but it is skipping and the sound pauses every few seconds and is not a pleasant viewing experience. I open QuickTime player with a movie and use the AirPlay icon from there and select the TV. I still see the play/pause action menu, but the rest of the player goes black and the TV is stuck on the AirPlay settings menu. For option 3 I go between resetting the device in AirPlay to forget the 1 time passcode (which only sometimes will work to give me a new code), asking for a password for each connection, or a code each time a device is connected. Nothing works. Even when I do manage to be given a passcode the TV stays on the AirPlay setting screen and the video player on the computer stays black. Quite annoying! Please please please fix! I've tried the fire wall setting mentioned here a few times, but this didn't work for me. Anyone else found a fix for something similar happening?
Posted Last updated
.