How stepanowon/youtube-vue3 works
youtube-vue3 is a small Vue 3 component library that embeds and controls a YouTube video player. A host Vue app registers or imports the component and supplies video and player options; the component creates the player, forwards playback-state events, and exposes player controls. Changing the video ID triggers a reload, and unmounting destroys the player. The demo App illustrates this usage. Source excerpts show component setup and integration, but not the internals of the youtube-player dependency or YouTube’s iframe API.
Main entry points: YoutubeVue3.vue Player component · index.js Plugin registration · App.vue Demo app
Components 6
Other components
- Vue host app
- Plugin registration
src/index.js - Player component
src/components/YoutubeVue3.vue - Demo app
src/App.vue - youtube-player
- YouTube player
Connections 7
- Vue host app → Plugin registration: installs plugin
README.md - Plugin registration → Player component: registers component
src/index.js - Vue host app → Player component: supplies props
README.md - Demo app → Player component: uses component
src/App.vue - Player component → youtube-player: creates player
src/components/YoutubeVue3.vue - Player component → YouTube player: configures video
src/components/YoutubeVue3.vue - YouTube player → Player component: reports state
src/components/YoutubeVue3.vue