Mute webview audio without javascript injection

Viewed 235

I would like to disable sound in a webview element of my app.

How can I achieve this without injecting javascript in the webpage?

I don't have control over the content of the content displayed.

I am aware of similar questions:

Mute webview in android apps

HTML5 Audio Mute in Android webview

They don't have constraint of no javascript injection, hence I have added a new question.

1 Answers

You can not mute only WebView but you can mute all app volume with AudioManager.

And here is the solution : Mute webview in android apps

Javascript is not used in these solutions, and I don't think there is any other way, you have no chance to interfere with the webview.

Related