Appearance
MediaPlayer
A video or audio player with the controls of the browser or accessible controls of its own.
ts
import { MediaPlayer } from '@zairakai/vue-components/Medias'Usage
vue
<MediaPlayer />Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | ||
class | string | ||
src | string | ||
type | string | 'video' | "video" or "audio". |
poster | string | ||
tracks | array | [] | Subtitles: { src, srclang, label, default }. |
customControls | boolean | false | Our own controls instead of the ones of the browser. |
loop | boolean | false | |
muted | boolean | false | |
playing | boolean | undefined | Whether it plays. Start playing by setting it, a browser can refuse without a click. |
label | string | ||
playLabel | string | 'Play' | |
pauseLabel | string | 'Pause' | |
muteLabel | string | 'Mute' | |
unmuteLabel | string | 'Unmute' | |
seekLabel | string | 'Seek' | |
volumeLabel | string | 'Volume' | |
speedLabel | string | 'Speed' | |
fullscreenLabel | string | 'Fullscreen' | |
speeds | array | [0.5, 1, 1.5, 2] |
Events
| Name | Description |
|---|---|
update:playing | |
update:time | |
ended | |
error |
Slots
| Name | Description |
|---|---|
default |
See Theming for the class hooks and the data-* state of the components.