Is there a way to determine webviewer is playing audio


Is there a way to determine if webviewer is playing audio.
for eg i have a tab in which webviewer plays audio now if user shift to other tab that audio is listenable in the background which is exactly what i want but i want to determine that when user switching the tab or navigate to any other part of the app then wehther the webview is playing audio in background or not.