PU-Video Component
A fully-featured video player component with playback controls, volume adjustment, and fullscreen support
Usage
Basic Usage
0:00 / 0:00
0:00 / 0:00
Prop | Type | Required | Default | Description |
---|---|---|---|---|
src | string | Yes | - | URL of the video file |
poster | string | No | undefined | URL of the poster image |
- Play/Pause controls
- Seek bar with current time and duration
- Volume control with mute toggle
- Fullscreen mode
- Keyboard shortcuts support
- Responsive design
- Base styling with Tailwind:
.video-container { @apply relative w-full max-w-xl border-2 border-primary-light-500 rounded-lg shadow-lg overflow-hidden; } .controls { @apply absolute -bottom-1 -left-1 w-[calc(100%+.5rem)] bg-white border-2 border-primary-light-500 rounded-b-lg text-primary-light-500 p-2 flex items-center gap-3; }
- Interactive elements:
button { @apply transition-transform transform hover:scale-110; } input[type="range"] { @apply cursor-pointer accent-primary-light-500; }
- Space: Play/Pause
- Arrow Left/Right: Seek backward/forward
- Arrow Up/Down: Adjust volume
- F: Toggle fullscreen
- M: Toggle mute
PUIcon
for control icons- Tailwind CSS for styling
- Vue 3 Composition API