@vue-player/nuxt
v0.1.3
Published
Official Nuxt 3 module for vue-player — auto-imports VideoPlayer and usePlayer
Maintainers
Readme
@vue-player/nuxt
Official Nuxt 3 module for vue-player — auto-imports VideoPlayer and usePlayer across your entire app with zero config.
Installation
npm install @vue-player/nuxtSetup
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@vue-player/nuxt'],
})That's it. The module automatically:
- Injects styles globally
- Registers
VideoPlayeras an auto-imported component - Registers
usePlayeras an auto-imported composable
Usage
No imports needed anywhere in your app:
<!-- pages/index.vue -->
<template>
<VideoPlayer src="https://example.com/video.mp4" />
</template>Options
export default defineNuxtConfig({
modules: ['@vue-player/nuxt'],
vuePlayer: {
prefix: 'Vp', // component becomes <VpVideoPlayer>, composable becomes useVpPlayer()
},
})