1

I want to play youtube video in webview on click of list items. Can anybody let me know in detail how can I use tag of HTML5 in android.

-rajani

rajani
  • 101
  • 7

1 Answers1

0

Use <iframe> :

  1. Upload the video to YouTube
  2. Take a note of the video id
  3. Define an <iframe> element in your web page
  4. Let the src attribute point to the video URL
  5. Use the width and height attributes to specify the dimension of the player
  6. Add any other parameters to the URL (see below)

Example:

<iframe width="420" height="315" src="https://www.youtube.com/embed/whatever"></iframe>