0

I want to add something like a "YouTubePlayer view" to my Android app and play a video in it. There are a lot of tutorials on how to play a video using its id, but none of the ones I found discussed about how to play it using its link.

Here are some of the formats in which a link can be:

url = 'https://www.youtube.com/watch?feature=g-vrec&v=Y1xs_xPb46M';
url = 'http://www.youtube.com/watch?feature=player_embedded&v=Ab25nviakcw#';
url = 'http://youtu.be/Ab25nviakcw';
url = 'http://www.youtube.com/watch?v=Ab25nviakcw';
url = 'https://www.youtube.com/watch?v=BGL22PTIOAM&feature=g-all-xit';

Is it possible to do it? If yes, how?

Utkarsh Saboo
  • 57
  • 2
  • 9

1 Answers1

0

I think you can try PIP mode, the same way as WhatsApp does. Here's another case: Play video from youtube in picture-in-picture mode

user3471194
  • 62
  • 1
  • 3
  • I'm sorry but playing the video in PIP mode is not what I want here. Isn't there any way I can play a video in a view directly through link? – Utkarsh Saboo Jul 25 '20 at 06:16