# Vue consumer example
Run the example from the repository root with Node from .node-version and Yarn
Classic 1.22.22. Use yarn install --frozen-lockfile and only the root yarn.lock.
```sh
yarn build artplayer artplayer-plugin-danmuku artplayer-plugin-document-pip
yarn dev:vue
yarn typecheck:vue
yarn lint:vue
yarn build:vue
yarn test:vue-consumer
```
The example's three ArtPlayer dependencies use local `file:../../packages/...`
references while the next major versions are unpublished. Build those packages
first and run the example commands from the repository root. Keep only the root
yarn.lock; external applications should select published versions. The isolated
consumer checks still replace these inputs with actual packed artifacts.
The build output is refactor/.cache/vue-example-dist.
Rebuild changed library distributions with yarn build followed by the package name.
## Files and ownership
- src/Player.vue owns the player and container through shallow refs. It constructs
once on mount, emits getInstance, then releases its reference before calling
destroy(false) on owner unmount. Vue owns the outer div. Player state is private:
the component ref exposes the normal Vue surface, not an art property.
- src/player-options.ts holds this example's existing configuration overrides:
French language, French/Indonesian dictionaries and fresh Danmuku/Document PiP
factories per mount. They still override option.lang, i18n and plugins. The
container comes from Vue; other options pass through. The url assertion preserves
the historical Partial input while the core performs runtime validation.
- src/App.vue demonstrates the existing event/prop syntax. Its reactive option
object keeps narrow field inference and is checked against `Partial