Hi, Shivali! These solutions below are framework-agnostic, so I think you'll be fine using them along with Vue.js for your project.
In fact, you don't need to use a iframe for embedding a YouTube video. You can either use: (a) the <embed> or <object> HTML tags, as described here; (b) the YouTube API, by creating a solution yourself, explained here; or (c) using a third-party library that already does it for you, such as plyr (there is also a Vue component for it), that you can customize according to your project requirements.
Hey, you can use vue-youtube. its easy to implement and its provide some events and props so that you can customise the player as per your requirement. npmjs.com/package/vue-youtube
Top comments (6)
Hi, Shivali! These solutions below are framework-agnostic, so I think you'll be fine using them along with Vue.js for your project.
In fact, you don't need to use a
iframe
for embedding a YouTube video. You can either use: (a) the<embed>
or<object>
HTML tags, as described here; (b) the YouTube API, by creating a solution yourself, explained here; or (c) using a third-party library that already does it for you, such as plyr (there is also a Vue component for it), that you can customize according to your project requirements.Thanks a lot
No problem! 😄
Hey, you can use vue-youtube. its easy to implement and its provide some events and props so that you can customise the player as per your requirement.
npmjs.com/package/vue-youtube
Thanks a lot @@10shubham01
😊