How to embed a YouTube clip in a WebView on Android

I am not sure if this is what you need. Anyway I hope the following be useful.
You can use the iframe method that youtube provides to play its videos. If the browser supports html5 will show the video with it, otherwise with flash.

You can use the following code as an example <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/bIPcobKMB94" frameborder="0">

in the above example the video id is bIPcobKMB94. You can change this id and show your video.

You can access a live example of it here

More infromation for youtube iframe

YouTube HTML5 Video Player

Leave a Comment