Monday, March 28, 2016

How to tell if WKWebView is playing audio?

Leave a Comment

I was curious if there was a way of telling if audio is coming from a specific WKWebView similar to the way you can find the tab playing audio in Chrome and Safari?

1 Answers

Answers 1

In the WKWebView's delegate, after webview loading finished, execute javascript that addEventListener to audio and video tag with event play, pause, ended. Then check the playback state for purpose.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment