How to get AVPlayer belong to WKWebView?

Hello,

I am able to load a webpage containing a video into WKWebView and play it.

Now I want to get the handle of the player underneath (I believe it is an AVPlayer) and dynamically replace the AVPlayerItem. I checked the view hierarchy using View Debugging -> Capture View Hierarchy but was not able to locate the AVPlayer.

Does anybody know how to ?

Thanks

Same question, but I need AVPlayer to disconnect audio from video to play it in background.
How to get AVPlayer belong to WKWebView?
 
 
Q