Personally i do not see benefit of just storing vide code id. Yes maybe in 10 000 years YouTube will change name and links won`t work but embed with full link is the simplest way to go.
@Kemito You don’t see the benefit of storing the video ID, and instead store the full link? Does that “full link” not also include the same video ID?
The advantage of storing just the video ID is that you can then display it however you want on the front end. You’re not tied to displaying it in whatever format the embed code you’ve copied is.
For Laracasts, do you think Jeffrey’s storing a Vimeo embed tag in the database? Or just the Vimeo ID after which he’s free to display the video however he wants in a view?
@martinbean I dont always think what Jeffrey would think. What i think is that its too much effort put in for such feature to worry about. As i would take full link and embed the video and move on.
Absolutely! Using YouTube videos on websites is a common practice. However, instead of directly using iframe tags, consider using the YouTube API. It provides more control, better performance, and additional features like autoplay, custom player controls, and event tracking. This can enhance user experience and offer a more seamless integration.