Post

Replies

Boosts

Views

Activity

Detect and stop Airplay on WKWebView that plays a video
What I have tried? UIScreen.screens.count > 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() -> 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
Can we use .HEIF files instead of .png for App Alternate Icons on iOS Applications?
Can we use .HEIF files instead of .png for App Alternate Icons on iOS Applications? Also any alternative to use .heif as UIImages on Xcode rather than converting them from Data to Image all the time.
Replies
1
Boosts
0
Views
463
Activity
May ’23
Detect and stop Airplay on WKWebView that plays a video
What I have tried? UIScreen.screens.count > 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() -> 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