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

16 Posts
Sort by:
Post not yet marked as solved
1 Replies
101 Views
We are facing a weird behaviour when implementing the AirPlay functionality of our iOS app. When we test our app on Apple TV devices everything works fine. On some smart TVs with a specific AirPlay receiver version, (more details below) the stream gets stuck on buffering state immediately after switching to AirPlay mode. On other smart TVs, with different AirPlay receiver version, everything works as expected. The interesting part is that other free or DRM protected streams, work fine on all devices. Smart TVs that AirPlay works fine AirPlay Version -> 25.06 (19.9.9) Smart TVs that AirPlay stuck at buffering state: AirPlayReceiverSDKVersion -> 3.3.0.54 AirPlayReceiverAppVersion -> 53.122.0 You can reproduce this issue using the following stream url: https://tr.vod.cdn.cosmotetvott.gr/v1/310/668/1674288197219/1674288197219.ism/.m3u8?qual=a&ios=1&hdnts=st=1713194669\~exp=1713237899\~acl=\*/310/668/1674288197219/1674288197219.ism/\*\~id=cab757e3-9922-48a5-988b-3a4f5da368b6\~data=de9bbd0100a8926c0311b7dbe5389f7d91e94a199d73b6dc75ea46a4579769d7~hmac=77b648539b8f3a823a7d398d69e5dc7060632c29 If this link expires, notify me to send a new one for testing. Could you please provide to us any specific suggestion as to what causes this issue on those specific streams?
Posted
by gcharita.
Last updated
.
Post not yet marked as solved
0 Replies
173 Views
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!
Posted
by CGSYSTEMS.
Last updated
.
Post not yet marked as solved
0 Replies
377 Views
I’m using the new ApplicationMusicPlayer support on macOS 14 and playing items from my Apple Music library. I wanted to play this music from my app to an AirPlay destination so i added an AVRoutePickerView. However, selecting any destination via this view doesn’t make a difference to the playback. It continues to play on my mac speakers no matter which airplay destination i choose. Also submitted as FB13521393.
Posted
by joekw.
Last updated
.
Post not yet marked as solved
0 Replies
485 Views
On an Apple TV, if you have an app that triggers a video playing in AVPlayer while another device is air playing to the Apple TV. The device gets disconnected from Airplay and the video plays instead. There doesn't seem to be a way to sense that Airplay is happening or not happening from the Apple TV side programmatically or a way to prevent the behavior. Is this intentional? It would seem to make more sense to have Airplay take priority or push the app to the background.
Posted Last updated
.
Post not yet marked as solved
0 Replies
484 Views
User flow: u1. a user starts playing some audio in the app before playing was set category try audioSession.setCategory(.playback, mode: .default, policy: .longFormAudio) was activated category try audioSession.setActive(true, options: []) set nowPlayingInfo playing via AVPlayer u2. user taps on the button of "airplay" (AVRoutePickerView) and changes the route of sound u3. A user can hear sounds from a Bluetooth column, or connect to an Apple TV with its own audio system... Issue: On iOS 17, after changing the route to Apple TV, a user can not hear a sound(apple tv works properly but sounds unavailable(if I do the same on iOS 16 everything works correctly)). AVPlayer works correctly. in the app I only receive event(name AVAudioSession.routeChangeNotification), and reason: RouteChangeReason.categoryChange (doc description: The audio category has changed (AVAudioSessionCategoryPlayback has been changed to AVAudioSessionCategoryPlayAndRecord).) Apps capabilities has "Background Mode" = Audio, AirPlay.... Questions: Does AirPlay require addition configs on iOS 17?(i tried to add in info.plist "AVInitialRouteSharingPolicy = LongformAudio" - this does not help me) What going on with AVPlayer?(it is playing, but where sound?) body of notification Printing description of notification: ▿ name = AVAudioSessionRouteChangeNotification, object = Optional(<AVAudioSession: 0x280089e10>), userInfo = Optional([AnyHashable("AVAudioSessionRouteChangePreviousRouteKey"): <AVAudioSessionRouteDescription: 0x2800a8960, inputs = ( ); outputs = ( "<AVAudioSessionPortDescription: 0x2800a8300, type = Speaker; name = \U0414\U0438\U043d\U0430\U043c\U0456\U043a; UID = Speaker; selectedDataSource = (null)>" )>, AnyHashable("AVAudioSessionRouteChangeReasonKey"): 3]) - name : "AVAudioSessionRouteChangeNotification" - object : <AVAudioSession: 0x280089e10> ▿ userInfo : 2 elements ▿ 0 : 2 elements ▿ key : AnyHashable("AVAudioSessionRouteChangePreviousRouteKey") - value : "AVAudioSessionRouteChangePreviousRouteKey" - value : <AVAudioSessionRouteDescription: 0x2800a8960, inputs = ( ); outputs = ( "<AVAudioSessionPortDescription: 0x2800a8300, type = Speaker; name = \U0414\U0438\U043d\U0430\U043c\U0456\U043a; UID = Speaker; selectedDataSource = (null)>" )> ▿ 1 : 2 elements ▿ key : AnyHashable("AVAudioSessionRouteChangeReasonKey") - value : "AVAudioSessionRouteChangeReasonKey" - value : 3
Posted
by vit008.
Last updated
.
Post not yet marked as solved
0 Replies
490 Views
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.
Posted
by botofogo.
Last updated
.
Post not yet marked as solved
2 Replies
1.4k Views
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?
Posted
by Lymon.
Last updated
.
Post not yet marked as solved
0 Replies
422 Views
I'm running airplaydemo and using bonjour confromance test(BCT) to capture the packets on an isolated Airport local network, however, BCT can never detect "initial probe from the device", i.e. no probe from airplay. *** Please Power On Device *** *** Beginning Link-Local Address Allocation Test *** START (INITIAL PROBING) WARNING 2023-10-10 11:42:39.997763-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:43:13.078729-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:43:45.105442-0500: Received address record query (name: devicex-000FFF0C527C.local., address: 169.254.65.124) before device successfully acquired a link-local IP address in subtest INITIAL PROBING. WARNING 2023-10-10 11:44:15.374914-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:44:48.453606-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:45:21.611736-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:45:54.746021-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:46:27.786306-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:47:00.811269-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:47:33.855415-0500: Have not received initial probe from device. Listening... WARNING 2023-10-10 11:48:06.928281-0500: Have not received initial probe from device. Listening... ERROR 2023-10-10 11:48:06.928404-0500: *** Have not received initial probe from device. Giving up after 10 re-tries FAILED (INITIAL PROBING) However, airplay actually worked fine, I can play music to it, and it fails BCT due to the "initial probe". Per my understand, "initial probe" here means "service announcement by airplay", but airplay never sends out that, instead, it responds to service queries from other devices(e.g. iphone, ipad) just fine, why is "initial probe" here a must have for BCT, why does not airplay send out them if it's a must-have for BCT? Thanks for any helps or hints.
Posted
by laoshaw.
Last updated
.
Post not yet marked as solved
15 Replies
19k 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 Syatek.
Last updated
.
Post not yet marked as solved
1 Replies
868 Views
Hello. I would like some advice on how to create ringtones from My Music Library. I would like to use iOS but might be willing to try using the Mac if that will work better. I know absolutely nothing about Audio editing and find it very intimidating. Not all of the ringtones I want to make are at the beginning of songs.I tried the free version of Ringtone Maker, and even got to the song I wanted, but I couldn't tell where I was in the track, as it told me where I was by a minute and second but wasn't playing through the headphones or speaker, so I was lost. Do I have to get this information from some other App beforehand? Any help would be much appreciated, preferably in layman's terms. Thanks.
Posted
by Sophialee.
Last updated
.
Post not yet marked as solved
4 Replies
1.9k Views
Hey there, we're using a CDN with HTTP referer checks in place for streaming media. When streaming with Airplay, what is the referer set on the HTTP header? For instance, for Google Chromecast, it's: https://www.gstatic.com/
Posted Last updated
.
Post not yet marked as solved
0 Replies
758 Views
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.
Posted
by antome.
Last updated
.
Post not yet marked as solved
1 Replies
795 Views
My app needs to display through the iMac and Apple TV for the demonstration purpose But during the AirPlay the app navigation is stuck because of the root view controller is getting as nil I am using the below code to get the root view controller let scenes = UIApplication.shared.connectedScenes let windowScene = scenes.first as? UIWindowScene let window = windowScene?.windows.first return window?.rootViewController Since rootViewController is nil, I can't push a new VC or pop to a specific VC in the navigation stack Only when the Air Play is turned off, I can continue the navigation in the app So this really becoming a blocker issue. Please provide your comments I am running on iOS 16.1.1 in the iPhone and My Xcode version is 14.3
Posted Last updated
.