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

Posts under AirPlay tag

20 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Wide-Area Bonjour / DNS-SD
I'm trying to make screen mirroring work with my own DNS by creating the static PTR SRV and TXT records. I create all the necesary b._dns-sd._udp lb._dns-sd._udp _services._dns-sd._udp and coresponding _airplay._tcp _raop._tcp records. That seems to work as I can see the records in dns-sd -Z _airplay._tcp and dns-sd -Z _roap._tcp or in the Discovery Browser app But for some sort of reason I cannot seem to see my displays in the Screen Mirroring menu If anyone has any suggestions, I am all ears.
0
0
58
21h
Airplay not working with Encrypted HLS m3u8 url using avplayer
Hi, I am using avplayer, want to stream airplay with my encrypted hls m3u8 url. I am sharing my code snippet. ` let contentUrl = URL(string: String(format:videoUrl)) let headers = ["token": token] let asset: AVURLAsset = AVURLAsset(url: contentUrl!, options["AVURLAssetHTTPHeaderFieldsKey": headers]) let playerItem: AVPlayerItem = AVPlayerItem(asset: asset) self.avPlayer?.replaceCurrentItem(with: playerItem) self.avPlayer?.play()` Airplay is not working on my tv when i start stream. My encrypted url won't work. Is there any way to stream airplay with encrypted url. Stuck here........
0
0
141
2w
How to play Encrypted HLS m3u8 url via Airplay using avplayer.
I have an avplayer with an encrypted m3u8 url and this is my code snippet let contentUrl = URL(string: String(format:videoUrl)) let headers = ["token": token] let asset: AVURLAsset = AVURLAsset(url: contentUrl!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers]) let playerItem: AVPlayerItem = AVPlayerItem(asset: asset) self.avPlayer?.replaceCurrentItem(with: playerItem) self.avPlayer?.play() When i try to stream Airplay the content not displaying. Airplay is not working with an encrypted url. How can i stream? Is there any way.
0
0
133
2w
kAudioHardwarePropertyDevices does not list AirPlay sound output device
The device listing core-audio API kAudioHardwarePropertyDevices does not list Airplay device if virtual-audio-driver is selected as sound output device in System settings. This virtual audio driver is developed by us and is named as BoomAudio. We need to select BoomAudio in System Settings Sound output so that we can get system audio and apply Boom effects/enhancement. But whenever BoomAudio is selected as sound output, we cannot get Airplay device in device-list API and hence cannot play-through to AirPlay sound output device. Steps: Select BoomAudio as Sound output in System Settings. (The issue occurs if any other sound output device like Headphone/Internal Speakers is selected) If AppleTV is connected then we should not AirPlay the system-display. Only Sound output of System should be Airplayed. Build and run the sample project that we have attached “SampleAirplayAudio Click on the button “Sound Output Device List”. Output: In the console of Xcode, Airplay device does not get listed. BoomAudio can be installed from the following path: https://d3jbf8nvvpx3fh.cloudfront.net/gdassets/airplaydts/Boom+2+Installer.zip The sample project 'SampleAirplayAudio' is available at this path: https://d3jbf8nvvpx3fh.cloudfront.net/gdassets/airplaydts/SampleAirplayAudio.zip We have already raised Bug report at Feedback Assistant Apple and the bug id is: FB7543204
0
0
198
Apr ’24
PSA regarding AVPlayerItem's automaticallyLoadedAssetKeys
For whoever needs to hear this... Say you have an AVURLAsset: let asset = AVURLAsset(url: URL(string: "https://www.example.com/playlist.m3u8")!) Then say you load that asset into an AVPlayerItem, and would like it to automatically load certain asset keys you're interested in ahead of time: let playerItem = AVPlayerItem( asset: avURLAsset, automaticallyLoadedAssetKeys: [ "metadata", "commonMetadata", "availableMetadataFormats", "allMediaSelections", "hasProtectedContent", "overallDurationHint"]) Among those keys, do not use "tracks" even though it's one of the available options. That will break AirPlay across all platforms (the user chooses an AirPlay destination and the AVPlayerItem's status instantly switches to failed). Took me far too long to track this down, just wanted to get it out there to save anybody else some time if they ever run into it.
0
0
197
Apr ’24
AirPlay stuck on buffering state
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?
3
0
467
4d
ApplicationMusicPlayer on macOS doesn’t work with AirPlay (AVRoutePickerView)
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.
0
0
479
Jan ’24
AVPlayer kicks device off Airplay
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.
0
0
589
Dec ’23
AirPlay doesn't work correctly on iOS 17
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
0
1
595
Nov ’23
iOS connecting to a AirPlay display
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.
0
1
574
Oct ’23
airplay never sent initial probe for bonjour conformance test
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.
0
0
513
Oct ’23
iOS 17 Beta: AVSampleBufferVideoRenderer, can it be used with AirPlay?
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.
0
0
844
Jul ’23
Sidecar not connecting, device timed out...
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!
17
0
20k
Sep ’23
Hoe to create a ringtones on iPhone
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.
1
0
1.2k
Sep ’23