# stepanowon/youtube-vue3 architecture

> Architecture diagram of the GitHub repository stepanowon/youtube-vue3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/stepanowon/youtube-vue3
- Repository: https://github.com/stepanowon/youtube-vue3

## Overview

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: [`src/components/YoutubeVue3.vue`](https://github.com/stepanowon/youtube-vue3/blob/master/src/components/YoutubeVue3.vue) (Player component), [`src/index.js`](https://github.com/stepanowon/youtube-vue3/blob/master/src/index.js) (Plugin registration), [`src/App.vue`](https://github.com/stepanowon/youtube-vue3/blob/master/src/App.vue) (Demo app)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_host(("Vue host app"))
node_registration["Plugin registration<br/>[index.js]"]
node_player_component["Player component<br/>[YoutubeVue3.vue]"]
node_demo_app["Demo app<br/>[App.vue]"]
node_youtube_player["youtube-player"]
node_youtube["YouTube player"]

node_host -->|"installs plugin"| node_registration
node_registration -->|"registers component"| node_player_component
node_host -->|"supplies props"| node_player_component
node_demo_app -->|"uses component"| node_player_component
node_player_component -->|"creates player"| node_youtube_player
node_player_component -->|"configures video"| node_youtube
node_youtube -->|"reports state"| node_player_component

click node_registration "https://github.com/stepanowon/youtube-vue3/blob/master/src/index.js"
click node_player_component "https://github.com/stepanowon/youtube-vue3/blob/master/src/components/YoutubeVue3.vue"
click node_demo_app "https://github.com/stepanowon/youtube-vue3/blob/master/src/App.vue"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_host,node_youtube_player,node_youtube toneIndigo
class node_registration,node_player_component,node_demo_app toneTeal
```

## Components

### Other components

- **Vue host app**
- [Plugin registration](https://github.com/stepanowon/youtube-vue3/blob/master/src/index.js): `src/index.js`
- [Player component](https://github.com/stepanowon/youtube-vue3/blob/master/src/components/YoutubeVue3.vue): `src/components/YoutubeVue3.vue`
- [Demo app](https://github.com/stepanowon/youtube-vue3/blob/master/src/App.vue): `src/App.vue`
- **youtube-player**
- **YouTube player**

## Connections

- Vue host app → Plugin registration: installs plugin (evidence: `README.md`)
- Plugin registration → Player component: registers component (evidence: `src/index.js`)
- Vue host app → Player component: supplies props (evidence: `README.md`)
- Demo app → Player component: uses component (evidence: `src/App.vue`)
- Player component → youtube-player: creates player (evidence: `src/components/YoutubeVue3.vue`)
- Player component → YouTube player: configures video (evidence: `src/components/YoutubeVue3.vue`)
- YouTube player → Player component: reports state (evidence: `src/components/YoutubeVue3.vue`)
