@vue-player/vue
Feature-rich Vue 3 video player with HLS streaming, subtitles, chapters and thumbnail previews
5,230
32
| Install | |
|---|---|
npm install @vue-player/vue |
|
| Latest Version: | 0.1.6 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Aug 9, 2026 |
| Links: | GitHub · npm |
Maintainer: v_chernyak
@vue-player/vue
Feature-rich Vue 3 video player with HLS adaptive streaming, chapters, subtitles, thumbnail previews and Picture-in-Picture — out of the box.
Documentation · Quick Start · API Reference
Features
- HLS adaptive streaming via
hls.js(optional) - Subtitles and captions (WebVTT)
- Chapter markers on the timeline
- Thumbnail preview scrubbing
- Picture-in-Picture
- Keyboard shortcuts
- Custom controls slot
usePlayercomposable for fully custom UIs- Full TypeScript support
Installation
npm install @vue-player/vue
For HLS adaptive streaming, also install hls.js:
npm install hls.js
Import styles once in your app entry:
import '@vue-player/vue/styles'
Basic Usage
<script setup>
import { VideoPlayer } from '@vue-player/vue'
</script>
<template>
<VideoPlayer src="https://example.com/video.mp4" />
</template>
HLS Streaming
Pass an .m3u8 URL — source type is detected automatically:
<template>
<VideoPlayer src="https://example.com/stream.m3u8" />
</template>
Subtitles and Chapters
<script setup lang="ts">
import { VideoPlayer } from '@vue-player/vue'
import type { Track, Chapter } from '@vue-player/core'
const tracks: Track[] = [
{ src: '/en.vtt', label: 'English', language: 'en', default: true },
]
const chapters: Chapter[] = [
{ time: 0, label: 'Intro' },
{ time: 60, label: 'Main' },
{ time: 300, label: 'Credits' },
]
</script>
<template>
<VideoPlayer
src="https://example.com/video.mp4"
poster="https://example.com/poster.jpg"
thumbnails="https://example.com/thumbs.vtt"
:tracks="tracks"
:chapters="chapters"
/>
</template>
usePlayer Composable
Build a fully custom player UI:
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { usePlayer } from '@vue-player/vue'
const videoRef = ref<HTMLVideoElement | null>(null)
const { state, controls, loadSource } = usePlayer(videoRef)
onMounted(() => loadSource('https://example.com/video.mp4'))
</script>
<template>
<video ref="videoRef" />
<button @click="state.isPlaying ? controls.pause() : controls.play()">
{{ state.isPlaying ? 'Pause' : 'Play' }}
</button>
<span>{{ state.currentTime.toFixed(1) }} / {{ state.duration.toFixed(1) }}</span>
</template>
Nuxt
Use the official @vue-player/nuxt module for zero-config auto-imports.
License
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 0.1.6 | MIT | |
| 0.1.5 | MIT | |
| 0.1.4 | MIT | |
| 0.1.3 | MIT | |
| 0.1.2 | MIT | |
| 0.1.1 | MIT | |
| 0.1.0 | MIT | |
| 0.0.1 | MIT |