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

Airplay swiftUI
So we have a media player in our SwiftUI app, and all the buttons go to the media function to play, pause , rewind etc. One feature people are requesting is the ability to airplay to other devices. I know they can do this via the Lock Screen and the notification bar, but wondering what function do I need to add to the media-player function to allow me to add a button to my swiftUI. I am wondering what function code do I need to add to my core mediaplayer.swift file that I can link a button too.
1
1
1.4k
Aug ’22
[iOS 16, AVPlayer, AirPlay] Base URL is not updated if URL was redirected
If the HLS playlist source URL returns a 301 (moved permanently) HTTP code, the AVPlayer doesn't update the URL after exiting the AirPlay. Example: http://example.com/old/playlist.m3u8 > 301 to http://example.com/new/something.m3u8 Everything works fine until we tap the Apple TV in the AirPlay options and then tap the iPhone in order to exit the AirPlay. The player should query: http://example.com/old/playlist.m3u8 > 301 to http://example.com/new/something.m3u8 The player is querying: http://example.com/old/something.m3u8 Which returns a Bad Request. Problem occurs on the iOS 16 beta 5, on the iOS 15 everything works as expected.
1
0
1.3k
Aug ’22
MFi Airplay Certification IPv6 Not Registering
How is the Airplay Certification Assistant querying for IPs? I am trying to certify a new MFi device (audio player) and am running through the "Airplay Certification Assistant" test cases. I am passing all but the IPv6, however I can verify that my device indeed has IPv4 and IPv6 addresses assigned. Any ideas to help troubleshoot are welcome, thanks.
0
0
1.2k
Aug ’22
AirPlaying HDR video via AVSampleBufferDisplayLayer - is this supposed to work?
Hi, Our iOS HDR video app uses AVSampleBufferDisplayLayer to present CVPixelBuffers containing HDR images, and on the HDR iPad screen, the output video look great. Recently I added support for external displays to the app, so that the app can play the video on Airplay-compatible devices, typically on an Apple TV 4K. The video display on the Apple TV works as expected, except that the image colours and dynamic don't look right. Same color issue when displaying the output video on a M1 max MacBook pro HDR screen, so it does no seem that the issue is due to the tv screen. An example of presented image buffer format: (lldb) po outputImage ▿ Optional<VideoImage>   ▿ some : VideoImage     - pixelBuffer : <CVPixelBuffer 0x283fa4960 width=3840 height=2160 pixelFormat=x444 iosurface=0x280cac880 planes=2> <Plane 0 width=3840 height=2160 bytesPerRow=7680> <Plane 1 width=3840 height=2160 bytesPerRow=15360> <attributes={     Height = 2160;     IOSurfaceProperties =     {         IOSurfacePurgeWhenNotInUse = 1;     };     PixelFormatType = 2016687156;     Width = 3840; } propagatedAttachments={     CVFieldCount = 1;     CVImageBufferChromaLocationBottomField = Left;     CVImageBufferChromaLocationTopField = Left;     CVImageBufferColorPrimaries = "ITU_R_2020";     CVImageBufferTransferFunction = "SMPTE_ST_2084_PQ"     CVImageBufferYCbCrMatrix = "ITU_R_2020"; } nonPropagatedAttachments={ } Hence my question: is HDR video playback via AirPlay in this context supposed to work? Or is such configuration not supported yet (tested in iOS 15.6)? Thanks.
0
1
1.2k
Aug ’22
AirPlay BLE discovery over different NAT was failed
I have Apple TV 4K connected router A, IP is 192.168.1.10. Apple TV send Bluetooth Low Energy(BLE) advertisement with the IP. I captured by BLE sniffer. I try "Screen Mirroring" from MacBook on router B, IP is 192.168.2.10 MacBook send "GET /info...RTSP/1.0" to appleTV:7000. Apple TV replay with 1368 bytes of "RTSP/1.0 200 OK..." that includes device name, type, features. But MacBook does not show my AppleTV as Display list. I like to know why my AppleTV is not recognized as mirroring display even all RTSP traffic has no error. mDNS from AppleTV is blocked by router. Ping from MacBook to Apple TV was success. If Apple TV and MacBook connect on same router, screen mirroring was success. Router A and B : Netgear Nighthawk Router netmask : 255.255.255.0 (both) MacBook : macOS Monterey 12.4 Apple TV : tvOS 15.6(19M65)
0
0
1.8k
Jul ’22
Sending Presentation to multiple displays via Airplay
Before I spend money on Roku devices that support Airplay, I wanted to first ask: Can Airplay simultaneously cast to multiple Airplay devices during a Keynote presentation? If not, is there a programatic solution like writing a system service to allow a multicast type thing to send the extended display out to multiple Airplay display devices? I use my MacBook Air Silicon to do Keynote presentations in presenter mode through an extended display. My main display on the laptop can have multiple windows open that I use for reference and the Keynote presentation is on the extended display. Some of the facilities I go into are not properly wired with a splitter to send my presentations out to multiple displays for easy view by my attendees.
0
0
843
Jul ’22
AirPlay from iOS to tvOS shows black screen
When I stream a audio-stream from iOS to tvOS it works, but shows the black screen (mirrorring or video screen I think). What do I have to do to tell tvOS that it's audio and therefore it shows the title, artist and image in the left top corner?I use AVPlayer (this is my ViewDidLoad)://0. Become first responder UIApplication.shared.becomeFirstResponder() //1. Set up the session radioAudioSession = AVAudioSession.sharedInstance() NotificationCenter.default.addObserver(self, selector: #selector(AVAudioSessionInterruption(_:)), name: NSNotification.Name.AVAudioSessionInterruption, object: nil) //2. Choose and set category do {try radioAudioSession.setCategory(AVAudioSessionCategoryPlayback, mode: AVAudioSessionModeDefault, routeSharingPolicy: .longForm)} catch {print("An Error occured setting catergory the audio session: \(error)")} do {try radioAudioSession.setActive(true, with: [])} catch {print("An Error occured activating the audio session: \(error)")} //3. Set AVPlayer radioAVPlayer = AVPlayer.init(playerItem: radioAVPlayerItem) //4. Handle interruptions -&gt; zie @objc func AVAudioSessionInterruption ... radioAVPlayerItem.addObserver(self, forKeyPath: "timedMetadata", options: NSKeyValueObservingOptions(), context: nil) radioAVPlayer.addObserver(self, forKeyPath: "rate", options: NSKeyValueObservingOptions(), context: nilThis is my update-function for NowPlayingInfo:func updateNowPlayingInfo (withRadiostation: [String], title: String?, artist: String?) { //bij title en artist = nil dan is er geen songinformatie beschikbaar in de stream let radioName = withRadiostation[0] let radioSlogan = withRadiostation[1] radioURL = URL.init(string: withRadiostation[2]) let radioImage = UIImage(named: withRadiostation[3])! nowPlaying.text = radioName let radioArtwork = MPMediaItemArtwork.init(boundsSize: radioImage.size, requestHandler: { (size) -&gt; UIImage in return radioImage}) if title == nil || artist == nil || (title?.isEmpty)! || (artist?.isEmpty)! { //MPMediaItemPropertyAssetURL: radioURL! audioInfo.nowPlayingInfo = [MPMediaItemPropertyTitle: radioName, MPMediaItemPropertyArtist: radioSlogan, MPNowPlayingInfoPropertyIsLiveStream: true, MPMediaItemPropertyMediaType: MPNowPlayingInfoMediaType.audio.rawValue, MPMediaItemPropertyArtwork: radioArtwork] } else { //MPMediaItemPropertyAssetURL: radioURL! audioInfo.nowPlayingInfo = [MPMediaItemPropertyTitle: title as Any, MPMediaItemPropertyArtist: artist as Any, MPNowPlayingInfoPropertyIsLiveStream: true, MPMediaItemPropertyMediaType: MPNowPlayingInfoMediaType.audio.rawValue, MPMediaItemPropertyArtwork: radioArtwork] } }
2
0
2.6k
Jul ’22
Airplay to Roku?
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!
1
0
1.2k
Jul ’22
Hide subtitle track or audio track on the AirPlay device
Hello I have a HLS manifest with multiple audio and multiple subtitle tracks. I use AVPlayer on iOS to play this HLS asset. On the iOS app I have the freedom to display selective subtitle and audio track list to the user but when the user uses AirPlay on the iOS, all the subtitle and audio tracks available in the HLS manifest is displayed to the user on the Apple TV (or any AirPlay compatible device). Let me explain with one example. Say, the HLS manifest has the following tracks: English, Spanish & German audio tracks English, Italian, Spanish & German subtitle tracks When the user uses AirPlay, I want to hide German language and display only the following tracks on the Apple TV: English & Spanish audio tracks English, Italian & Spanish subtitle tracks The primary intent here is that the user should not be able to see German language anywhere on the target AirPlay device. How to achieve this in code? Note: It's difficult to modify the source HLS manifest file.
0
0
1.4k
Jun ’22
SharePlay initiated via AirPlay Button
We recently implemented SharePlay in our broadcasting app and most of things work fine. We now found out, that the user, during an SharePlay session, is able to hand over the session to an Apple TV via the AirPlay Button, which is convenient, because during the SharePlay session, this should be exactly what the user had in mind. However, since this is not the start of a "real" or "normal" AirPlay, things are different. Especially AVPlayers isExternalPlaybackActive property doesn't change in case it's a SharePlay handover. This leads to problems in our app with AirPlay and SharePlay behaviour. Most of all, the user cannot control the playback anymore from his device, only other participants of the SharePlay session can. How can we detect the hand over to Apple TV? Is there an alternative to isExternalPlaybackActive for the SharePlay case?
0
0
735
Jun ’22
AirPlay - http live streaming - request headers
I am looking for some guidance on an authentication issue related to AirPlay sessions for HLS streams. Our app currently uses token authentication for our HLS streams, but for AirPlay sessions we only authenticate on the master manifest since the user has already authenticated via the app and However, this does leave open the potential for someone to fake an AirPlay User-Agent and request rendition manifests and segments without authentication. We wouldn't be able to perform the token authentication on the AirPlay since we can't pass the custom header with the token across the AirPlay session boundaries. Support showed me a potential workaround of using " AVAssetResourceLoader", but that would not work in my case, as I don't have the ability to make changes on the iOS app. So that leads me to trying to solve this issue at the CDN level. What I would like to do is try and verify that requests are coming from valid AirPlay devices/sessions by checking for headers that are included specifically for an AirPlay session. Searching online led me to these two possible headers, " X-Apple-Device-ID: X-Apple-Session-ID: " ,but I have not been able to see them when checking on the CDN. Is there any documentation on default/standard headers that would/should appear in AirPlay requests? Thanks
1
0
1.3k
Jun ’22
AirPlay to the Mac
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?
1
0
1.3k
May ’22
Airplay not working with Mac Mini M1 - Apple Silicon on Sony KD-65XH9096
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?
10
0
6.9k
May ’22
Screen mirroring from iPhone to Apple TV is glitchy sometimes
I have an app that supports screen mirroring by connecting to an external display to show a different UI (not just playing a video). Most of the time it works great, but it occasionally has issues with 4K TVs where the screen and audio are glitchy on the TV. I tell people to go through all the troubleshooting steps from Apple about getting AirPlay to work. Sometimes it helps, but not always, so I'd like to have a more permanent fix. I am suspicious that it happens because too much data is being sent over AirPlay too frequently. I was hoping to either be able to limit the frequency of updates (maybe lowering the refresh rate somehow) or to decrease the resolution of the view controller that is sent over AirPlay. I have not found anything for the first idea, but regarding the second one, in the docs, it says that you can change the UIScreen's currentMode property (effectively changing the resolution). I have tried doing this in multiple ways, but I have not been able to get that to work--after assigning a different value to currentMode it still has the old value. The docs say to "apply that mode to the UIScreen object before associating the screen with a window." There are two problems here: That instruction seems to be a little outdated because since iOS 13 the UIScreen is associated with a UIWindowScene instead of UIWindow. Does that make any of this different with how I can/should update the UIScreenMode? I have tried setting the currentMode inside the observation block for UIScreen.didConnectNotification as well as inside the AppDelegate's application(:configurationForConnecting:options) method. Neither of those have worked, even if the UIScreen is not yet associated with a UIWindowScene. If I'm going about this incorrectly, please help me correct my mistake. Ultimately I just want to fix the glitchiness with screen mirroring, so I'm happy to do that in whatever way I can.
0
0
1.6k
May ’22
Cannot disable airplay button in Safari > 12 version
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?
1
0
1.4k
Apr ’22
Detect and stop Airplay on WKWebView that plays a video
What I have tried? UIScreen.screens.count &gt; 1 Ans : Always getting one even though my app is currently Airplay(ing) on my Macbook Setting configuration of WKWebView mediaPlaybackAllowsAirPlay = false allowsAirPlayForMediaPlayback = false Although the airplay button is not present in the player controls but one can still caste using the control panel airplay button by swipping the screen from above. Tried this method used widely to detect Airplay but it only detects in case of screen mirroring no callbacks for Airplay. func isAirplayOn() -&gt; Bool {     let audioSession = AVAudioSession.sharedInstance()     let currentRoute = audioSession.currentRoute     for outputPort in currentRoute.outputs {       if outputPort.portType == AVAudioSession.Port.airPlay {         return true       }     }     return false } So to my vain this also does not work. Let me know how to either detect airplay or disable it on WKWebView's Audio/Video Player. Any help will be highly appreciated.
0
0
1.1k
Apr ’22
AirPlay with Mac M1
Hello community, is there any progress with the airplay problem between Mac with M1 and HomePod mini? There are already many updates since 11.6 but it does not solve the problem, AirPlay stops working and you have to restart or stop the functions in Activity Monitor. Does anyone know anything, thanks.
2
0
734
Feb ’22
Air play not working from iphone 11 promax to macbook air
Hi can anyone help? I was using airplay fine to transfer videos and photos to my macbook air from my iphone 11 pro, but the last three times I have tried it has not worked, just sits there with waiting, now telling me online that both macbook and iphone need to be on same network but i use my iphone hotspot for my macbook for internet as I am not near a wifi area can anyone poffer suggestions? its annoying having to email videos to myself all the time now
1
0
1.1k
Feb ’22
Airplay swiftUI
So we have a media player in our SwiftUI app, and all the buttons go to the media function to play, pause , rewind etc. One feature people are requesting is the ability to airplay to other devices. I know they can do this via the Lock Screen and the notification bar, but wondering what function do I need to add to the media-player function to allow me to add a button to my swiftUI. I am wondering what function code do I need to add to my core mediaplayer.swift file that I can link a button too.
Replies
1
Boosts
1
Views
1.4k
Activity
Aug ’22
[iOS 16, AVPlayer, AirPlay] Base URL is not updated if URL was redirected
If the HLS playlist source URL returns a 301 (moved permanently) HTTP code, the AVPlayer doesn't update the URL after exiting the AirPlay. Example: http://example.com/old/playlist.m3u8 > 301 to http://example.com/new/something.m3u8 Everything works fine until we tap the Apple TV in the AirPlay options and then tap the iPhone in order to exit the AirPlay. The player should query: http://example.com/old/playlist.m3u8 > 301 to http://example.com/new/something.m3u8 The player is querying: http://example.com/old/something.m3u8 Which returns a Bad Request. Problem occurs on the iOS 16 beta 5, on the iOS 15 everything works as expected.
Replies
1
Boosts
0
Views
1.3k
Activity
Aug ’22
MFi Airplay Certification IPv6 Not Registering
How is the Airplay Certification Assistant querying for IPs? I am trying to certify a new MFi device (audio player) and am running through the "Airplay Certification Assistant" test cases. I am passing all but the IPv6, however I can verify that my device indeed has IPv4 and IPv6 addresses assigned. Any ideas to help troubleshoot are welcome, thanks.
Replies
0
Boosts
0
Views
1.2k
Activity
Aug ’22
AirPlaying HDR video via AVSampleBufferDisplayLayer - is this supposed to work?
Hi, Our iOS HDR video app uses AVSampleBufferDisplayLayer to present CVPixelBuffers containing HDR images, and on the HDR iPad screen, the output video look great. Recently I added support for external displays to the app, so that the app can play the video on Airplay-compatible devices, typically on an Apple TV 4K. The video display on the Apple TV works as expected, except that the image colours and dynamic don't look right. Same color issue when displaying the output video on a M1 max MacBook pro HDR screen, so it does no seem that the issue is due to the tv screen. An example of presented image buffer format: (lldb) po outputImage ▿ Optional<VideoImage>   ▿ some : VideoImage     - pixelBuffer : <CVPixelBuffer 0x283fa4960 width=3840 height=2160 pixelFormat=x444 iosurface=0x280cac880 planes=2> <Plane 0 width=3840 height=2160 bytesPerRow=7680> <Plane 1 width=3840 height=2160 bytesPerRow=15360> <attributes={     Height = 2160;     IOSurfaceProperties =     {         IOSurfacePurgeWhenNotInUse = 1;     };     PixelFormatType = 2016687156;     Width = 3840; } propagatedAttachments={     CVFieldCount = 1;     CVImageBufferChromaLocationBottomField = Left;     CVImageBufferChromaLocationTopField = Left;     CVImageBufferColorPrimaries = "ITU_R_2020";     CVImageBufferTransferFunction = "SMPTE_ST_2084_PQ"     CVImageBufferYCbCrMatrix = "ITU_R_2020"; } nonPropagatedAttachments={ } Hence my question: is HDR video playback via AirPlay in this context supposed to work? Or is such configuration not supported yet (tested in iOS 15.6)? Thanks.
Replies
0
Boosts
1
Views
1.2k
Activity
Aug ’22
AirPlay BLE discovery over different NAT was failed
I have Apple TV 4K connected router A, IP is 192.168.1.10. Apple TV send Bluetooth Low Energy(BLE) advertisement with the IP. I captured by BLE sniffer. I try "Screen Mirroring" from MacBook on router B, IP is 192.168.2.10 MacBook send "GET /info...RTSP/1.0" to appleTV:7000. Apple TV replay with 1368 bytes of "RTSP/1.0 200 OK..." that includes device name, type, features. But MacBook does not show my AppleTV as Display list. I like to know why my AppleTV is not recognized as mirroring display even all RTSP traffic has no error. mDNS from AppleTV is blocked by router. Ping from MacBook to Apple TV was success. If Apple TV and MacBook connect on same router, screen mirroring was success. Router A and B : Netgear Nighthawk Router netmask : 255.255.255.0 (both) MacBook : macOS Monterey 12.4 Apple TV : tvOS 15.6(19M65)
Replies
0
Boosts
0
Views
1.8k
Activity
Jul ’22
Sending Presentation to multiple displays via Airplay
Before I spend money on Roku devices that support Airplay, I wanted to first ask: Can Airplay simultaneously cast to multiple Airplay devices during a Keynote presentation? If not, is there a programatic solution like writing a system service to allow a multicast type thing to send the extended display out to multiple Airplay display devices? I use my MacBook Air Silicon to do Keynote presentations in presenter mode through an extended display. My main display on the laptop can have multiple windows open that I use for reference and the Keynote presentation is on the extended display. Some of the facilities I go into are not properly wired with a splitter to send my presentations out to multiple displays for easy view by my attendees.
Replies
0
Boosts
0
Views
843
Activity
Jul ’22
AirPlay from iOS to tvOS shows black screen
When I stream a audio-stream from iOS to tvOS it works, but shows the black screen (mirrorring or video screen I think). What do I have to do to tell tvOS that it's audio and therefore it shows the title, artist and image in the left top corner?I use AVPlayer (this is my ViewDidLoad)://0. Become first responder UIApplication.shared.becomeFirstResponder() //1. Set up the session radioAudioSession = AVAudioSession.sharedInstance() NotificationCenter.default.addObserver(self, selector: #selector(AVAudioSessionInterruption(_:)), name: NSNotification.Name.AVAudioSessionInterruption, object: nil) //2. Choose and set category do {try radioAudioSession.setCategory(AVAudioSessionCategoryPlayback, mode: AVAudioSessionModeDefault, routeSharingPolicy: .longForm)} catch {print("An Error occured setting catergory the audio session: \(error)")} do {try radioAudioSession.setActive(true, with: [])} catch {print("An Error occured activating the audio session: \(error)")} //3. Set AVPlayer radioAVPlayer = AVPlayer.init(playerItem: radioAVPlayerItem) //4. Handle interruptions -&gt; zie @objc func AVAudioSessionInterruption ... radioAVPlayerItem.addObserver(self, forKeyPath: "timedMetadata", options: NSKeyValueObservingOptions(), context: nil) radioAVPlayer.addObserver(self, forKeyPath: "rate", options: NSKeyValueObservingOptions(), context: nilThis is my update-function for NowPlayingInfo:func updateNowPlayingInfo (withRadiostation: [String], title: String?, artist: String?) { //bij title en artist = nil dan is er geen songinformatie beschikbaar in de stream let radioName = withRadiostation[0] let radioSlogan = withRadiostation[1] radioURL = URL.init(string: withRadiostation[2]) let radioImage = UIImage(named: withRadiostation[3])! nowPlaying.text = radioName let radioArtwork = MPMediaItemArtwork.init(boundsSize: radioImage.size, requestHandler: { (size) -&gt; UIImage in return radioImage}) if title == nil || artist == nil || (title?.isEmpty)! || (artist?.isEmpty)! { //MPMediaItemPropertyAssetURL: radioURL! audioInfo.nowPlayingInfo = [MPMediaItemPropertyTitle: radioName, MPMediaItemPropertyArtist: radioSlogan, MPNowPlayingInfoPropertyIsLiveStream: true, MPMediaItemPropertyMediaType: MPNowPlayingInfoMediaType.audio.rawValue, MPMediaItemPropertyArtwork: radioArtwork] } else { //MPMediaItemPropertyAssetURL: radioURL! audioInfo.nowPlayingInfo = [MPMediaItemPropertyTitle: title as Any, MPMediaItemPropertyArtist: artist as Any, MPNowPlayingInfoPropertyIsLiveStream: true, MPMediaItemPropertyMediaType: MPNowPlayingInfoMediaType.audio.rawValue, MPMediaItemPropertyArtwork: radioArtwork] } }
Replies
2
Boosts
0
Views
2.6k
Activity
Jul ’22
Airplay to Roku?
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!
Replies
1
Boosts
0
Views
1.2k
Activity
Jul ’22
Port 5000 still in use
Hi, I have my airplay receiver off but I still get the 'Port 5000 is already in use' message, I have already restarted my macbook a few times and still get the message. I know I can change to another port but this port used to work a few weeks ago when the airplay receiver was off.
Replies
1
Boosts
0
Views
4k
Activity
Jun ’22
Hide subtitle track or audio track on the AirPlay device
Hello I have a HLS manifest with multiple audio and multiple subtitle tracks. I use AVPlayer on iOS to play this HLS asset. On the iOS app I have the freedom to display selective subtitle and audio track list to the user but when the user uses AirPlay on the iOS, all the subtitle and audio tracks available in the HLS manifest is displayed to the user on the Apple TV (or any AirPlay compatible device). Let me explain with one example. Say, the HLS manifest has the following tracks: English, Spanish & German audio tracks English, Italian, Spanish & German subtitle tracks When the user uses AirPlay, I want to hide German language and display only the following tracks on the Apple TV: English & Spanish audio tracks English, Italian & Spanish subtitle tracks The primary intent here is that the user should not be able to see German language anywhere on the target AirPlay device. How to achieve this in code? Note: It's difficult to modify the source HLS manifest file.
Replies
0
Boosts
0
Views
1.4k
Activity
Jun ’22
SharePlay initiated via AirPlay Button
We recently implemented SharePlay in our broadcasting app and most of things work fine. We now found out, that the user, during an SharePlay session, is able to hand over the session to an Apple TV via the AirPlay Button, which is convenient, because during the SharePlay session, this should be exactly what the user had in mind. However, since this is not the start of a "real" or "normal" AirPlay, things are different. Especially AVPlayers isExternalPlaybackActive property doesn't change in case it's a SharePlay handover. This leads to problems in our app with AirPlay and SharePlay behaviour. Most of all, the user cannot control the playback anymore from his device, only other participants of the SharePlay session can. How can we detect the hand over to Apple TV? Is there an alternative to isExternalPlaybackActive for the SharePlay case?
Replies
0
Boosts
0
Views
735
Activity
Jun ’22
AirPlay - http live streaming - request headers
I am looking for some guidance on an authentication issue related to AirPlay sessions for HLS streams. Our app currently uses token authentication for our HLS streams, but for AirPlay sessions we only authenticate on the master manifest since the user has already authenticated via the app and However, this does leave open the potential for someone to fake an AirPlay User-Agent and request rendition manifests and segments without authentication. We wouldn't be able to perform the token authentication on the AirPlay since we can't pass the custom header with the token across the AirPlay session boundaries. Support showed me a potential workaround of using " AVAssetResourceLoader", but that would not work in my case, as I don't have the ability to make changes on the iOS app. So that leads me to trying to solve this issue at the CDN level. What I would like to do is try and verify that requests are coming from valid AirPlay devices/sessions by checking for headers that are included specifically for an AirPlay session. Searching online led me to these two possible headers, " X-Apple-Device-ID: X-Apple-Session-ID: " ,but I have not been able to see them when checking on the CDN. Is there any documentation on default/standard headers that would/should appear in AirPlay requests? Thanks
Replies
1
Boosts
0
Views
1.3k
Activity
Jun ’22
AirPlay to the Mac
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?
Replies
1
Boosts
0
Views
1.3k
Activity
May ’22
webview.allowsInlineMediaPlayback
I am developing a hybrid app, I am using java script and html, to be able to compile it to xcode I use capacitor, the problem is that my app includes videos but I cannot block the native ios player, I want to block it. webview.allowsInlineMediaPlayback = yes; I found this, the problem is that it only blocks it for ipad, not for iphones.
Replies
1
Boosts
0
Views
1k
Activity
May ’22
Airplay not working with Mac Mini M1 - Apple Silicon on Sony KD-65XH9096
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?
Replies
10
Boosts
0
Views
6.9k
Activity
May ’22
Screen mirroring from iPhone to Apple TV is glitchy sometimes
I have an app that supports screen mirroring by connecting to an external display to show a different UI (not just playing a video). Most of the time it works great, but it occasionally has issues with 4K TVs where the screen and audio are glitchy on the TV. I tell people to go through all the troubleshooting steps from Apple about getting AirPlay to work. Sometimes it helps, but not always, so I'd like to have a more permanent fix. I am suspicious that it happens because too much data is being sent over AirPlay too frequently. I was hoping to either be able to limit the frequency of updates (maybe lowering the refresh rate somehow) or to decrease the resolution of the view controller that is sent over AirPlay. I have not found anything for the first idea, but regarding the second one, in the docs, it says that you can change the UIScreen's currentMode property (effectively changing the resolution). I have tried doing this in multiple ways, but I have not been able to get that to work--after assigning a different value to currentMode it still has the old value. The docs say to "apply that mode to the UIScreen object before associating the screen with a window." There are two problems here: That instruction seems to be a little outdated because since iOS 13 the UIScreen is associated with a UIWindowScene instead of UIWindow. Does that make any of this different with how I can/should update the UIScreenMode? I have tried setting the currentMode inside the observation block for UIScreen.didConnectNotification as well as inside the AppDelegate's application(:configurationForConnecting:options) method. Neither of those have worked, even if the UIScreen is not yet associated with a UIWindowScene. If I'm going about this incorrectly, please help me correct my mistake. Ultimately I just want to fix the glitchiness with screen mirroring, so I'm happy to do that in whatever way I can.
Replies
0
Boosts
0
Views
1.6k
Activity
May ’22
Cannot disable airplay button in Safari > 12 version
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?
Replies
1
Boosts
0
Views
1.4k
Activity
Apr ’22
Detect and stop Airplay on WKWebView that plays a video
What I have tried? UIScreen.screens.count &gt; 1 Ans : Always getting one even though my app is currently Airplay(ing) on my Macbook Setting configuration of WKWebView mediaPlaybackAllowsAirPlay = false allowsAirPlayForMediaPlayback = false Although the airplay button is not present in the player controls but one can still caste using the control panel airplay button by swipping the screen from above. Tried this method used widely to detect Airplay but it only detects in case of screen mirroring no callbacks for Airplay. func isAirplayOn() -&gt; Bool {     let audioSession = AVAudioSession.sharedInstance()     let currentRoute = audioSession.currentRoute     for outputPort in currentRoute.outputs {       if outputPort.portType == AVAudioSession.Port.airPlay {         return true       }     }     return false } So to my vain this also does not work. Let me know how to either detect airplay or disable it on WKWebView's Audio/Video Player. Any help will be highly appreciated.
Replies
0
Boosts
0
Views
1.1k
Activity
Apr ’22
AirPlay with Mac M1
Hello community, is there any progress with the airplay problem between Mac with M1 and HomePod mini? There are already many updates since 11.6 but it does not solve the problem, AirPlay stops working and you have to restart or stop the functions in Activity Monitor. Does anyone know anything, thanks.
Replies
2
Boosts
0
Views
734
Activity
Feb ’22
Air play not working from iphone 11 promax to macbook air
Hi can anyone help? I was using airplay fine to transfer videos and photos to my macbook air from my iphone 11 pro, but the last three times I have tried it has not worked, just sits there with waiting, now telling me online that both macbook and iphone need to be on same network but i use my iphone hotspot for my macbook for internet as I am not near a wifi area can anyone poffer suggestions? its annoying having to email videos to myself all the time now
Replies
1
Boosts
0
Views
1.1k
Activity
Feb ’22