0

I am new to Android and I am facing a Problem in Playing YouTube Video in Fragment.

Issue : When I start the Video it plays and then if I press the back button and then again start the Video, it keeps loading... and doesn't play. This happens only if I play the Video in Fragment, but in Activity everything works fine.

I came to know that there is Issue in the YouTube API latest version that I have (10.37.58), in earlier version it was working for both Activity and Fragment.

Can anybody please help me out here ?

Thanks.

2 Answers2

0

<iframe src="https://onedrive.live.com/embed?cid=9270ED6D8EAB1F61&resid=9270ED6D8EAB1F61%211024&authkey=AP6ydCCh8uM-GMY" width="320" height="240" frameborder="0" scrolling="no"></iframe>
0

You can embed Youtube in a webview with iFrame.if you have youtube video id you can do it with url.

try this

Community
  • 1
  • 1
Akhil Jayakumar
  • 2,262
  • 14
  • 25