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

Big Sur Music app will not AirPlay if EQ is turned on
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??
0
0
476
Aug ’21
ios 15 and bluetooth always connected airpods
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
0
0
806
Aug ’21
AVPlayer.timeControlStatus is not updated when switch playback from the device to AirPlay
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()         }     } }
3
0
2.9k
Aug ’21
Airplay to LG Smart TV
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?
1
0
2.6k
Aug ’21
AVAudioEngine when connected to Airplay
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!
1
0
1.8k
Aug ’21
[AirPlay] AVPlayerItemMetadataCollector doesn't report ad breaks
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?
1
0
942
Aug ’21
How does data consumption use for Airplay downloaded iTunes movies from iPad to Apple TV
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.
1
0
783
Jul ’21
IOS 14.6 Bluetooth Issue!
I am facing this weird issue with my iphone Xr whenever i connect to my oneplus bullets wireless (bass edition) specifically, (BTW i have more than 2 of those) i connect them there's some distortion/cracking sound when music is played above 60% and also if i quickly toggle volume from control center the connection stops and reconnects automatically. first i thought it's the earphone itself but no when i connect the same earphone with my android phone it's working flawlessly.
0
0
726
Jun ’21
Big Sur Music app will not AirPlay if EQ is turned on
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??
Replies
0
Boosts
0
Views
476
Activity
Aug ’21
ios 15 and bluetooth always connected airpods
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
Replies
0
Boosts
0
Views
806
Activity
Aug ’21
AVPlayer.timeControlStatus is not updated when switch playback from the device to AirPlay
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()         }     } }
Replies
3
Boosts
0
Views
2.9k
Activity
Aug ’21
Airplay to LG Smart TV
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?
Replies
1
Boosts
0
Views
2.6k
Activity
Aug ’21
AVAudioEngine when connected to Airplay
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!
Replies
1
Boosts
0
Views
1.8k
Activity
Aug ’21
[AirPlay] AVPlayerItemMetadataCollector doesn't report ad breaks
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?
Replies
1
Boosts
0
Views
942
Activity
Aug ’21
How does data consumption use for Airplay downloaded iTunes movies from iPad to Apple TV
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.
Replies
1
Boosts
0
Views
783
Activity
Jul ’21
Big sur mac and Ipad pro sidecar issue
I wanted to use the feature Sidecarin my Macbook pro 16 to my Ipad pro 5th gen. I have the latest Big sur and Ipad IOS but the settings for side car is not showing up on my mac and cannot use sidecar.. any idea on how to make this work?
Replies
0
Boosts
0
Views
642
Activity
Jun ’21
IOS 14.6 Bluetooth Issue!
I am facing this weird issue with my iphone Xr whenever i connect to my oneplus bullets wireless (bass edition) specifically, (BTW i have more than 2 of those) i connect them there's some distortion/cracking sound when music is played above 60% and also if i quickly toggle volume from control center the connection stops and reconnects automatically. first i thought it's the earphone itself but no when i connect the same earphone with my android phone it's working flawlessly.
Replies
0
Boosts
0
Views
726
Activity
Jun ’21