0 Replies
      Latest reply on Sep 14, 2017 2:46 AM by localaeapp
      localaeapp Level 1 Level 1 (0 points)

        I am using WKWebview to load a webpage that has a list of media files.

        When I select a media file, I want it to be played locally only, and not through airplay.

        For this I use the following code snippet:


                var webView: WKWebView

                let config = WKWebViewConfiguration()

                config.allowsAirPlayForMediaPlayback = false


                webView = WKWebView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height), configuration: config)



        However, airplay is still used for media playback and the value "allowsAirPlayForMediaPlayback" remains set to true.