how to embed video on website from youtube

Hi! Is there a way to imbed a video in the website from youtube ? I mean, other than just putting in the link to YouTube? im trying from 1 week it get error of plugin. and some time it not not play
If so, how would I do it?
Thank you?

Hi, could you specify which language / framework / service / plugin are you using?

  • the simplest solution is via iframe element (object and embed have been deprecated) or look up Youtube Api

  • difficult solution is to download video to your apps file storage, write a code that detects not loading / lagging of video (on the client side) and load it from the file storage as an alternative

P.S. second solution might be a little legally tricky if you don’t own the video

2 Likes

Thanks For Sharing

My Problem Is Solved.

1 Like

Thank you for share great information.

@damir-bubanovic wrote:

Hi, could you specify which language / framework / service / plugin are you using?

 

  • difficult solution is to download video to your apps file storage, write a code that detects not loading / lagging of video (on the client side) and load it from the file storage as an alternative

 

P.S. second solution might be a little legally tricky if you don’t own the video

 

 Lot of thanks for such a great solution. Earlier I tried to do it with few plugins but they didn’t work as fine as this method of yours. I am happy. Thanks

Regards

1 Like

Yes, I was also getting this error on a page of my website, Fixed it using the iframe method provided here.  The problem was with the theme and i updated the theme and worked well on the new theme. 

1 Like