A
A
Andrey M2014-07-15 16:28:34
Android
Andrey M, 2014-07-15 16:28:34

How to disable video playback in WebView?

I get the content displayed in the WebView through the API (that is, I put the text in the WebView). Sometimes there is a YouTube video on the page. The video is hosted in an iframe. When you click on the preview, the video plays inside the form. How to make it so that by clicking on the preview, the Intent is forwarded, and the services working with links (Browser, YouTube player) are called?

With normal links, everything is fine, they are intercepted through a custom WebViewClient.

iframe example:

<iframe
           frameborder="0"
           src="https://www.youtube.com/embed/Vppbdf-qtGU"
           width="100%">
</iframe>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question