---
title: VideoPlayer
description: >-
A video player component built on Video.js with a play/pause UI overlay, and
programmatic playback control
api_name: shop-minis
source_url:
html: 'https://shopify.dev/docs/api/shop-minis/components/primitives/videoplayer'
md: 'https://shopify.dev/docs/api/shop-minis/components/primitives/videoplayer.md'
---
# Video​Playercomponent
A video player component built on Video.js with a play/pause UI overlay, and programmatic playback control
### Examples
* #### VideoPlayer
##### Default
```tsx
import {VideoPlayer} from '@shopify/shop-minis-react'
export default function MyComponent() {
const handlePlay = () => {
console.log('Video started playing')
}
const handlePause = () => {
console.log('Video paused')
}
const handleEnded = () => {
console.log('Video ended')
}
return (
)
}
```
## Preview

## Examples
VideoPlayer configurations and features
Basic video player
A basic video player with a fixed height and poster image
Imperative controls
Video player with imperative controls
### Examples
* #### Basic video player
##### Description
A basic video player with a fixed height and poster image
##### Default
```tsx
import {VideoPlayer} from '@shopify/shop-minis-react'
export default function MyComponent() {
const handlePlay = () => {
console.log('Video started playing')
}
const handlePause = () => {
console.log('Video paused')
}
const handleEnded = () => {
console.log('Video ended')
}
return (
)
}
```
* #### Imperative controls
##### Description
Video player with imperative controls
##### Default
```tsx
import {useRef} from 'react'
import {VideoPlayer, Button, VideoPlayerRef} from '@shopify/shop-minis-react'
export default function MyComponent() {
const handlePlay = () => {
ref.current?.play()
}
const handlePause = () => {
ref.current?.pause()
}
const ref = useRef(null)
return (
)
}
```