MediaPlayerController
Purpose
A thin stimulus controller wrapper around the native HTML5 video and audio tag controls.
Provides the following basic interactions:
- Play
- Pause
- Seek
- Restart
See https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ for more information.
Actions
Action | Purpose |
---|---|
play | Play the media |
pause | Pause the media |
restart | Set the player to the start of the media |
seek | Advance the player by 5 seconds |
Targets
Target | Purpose | Default |
---|---|---|
media | The <video> or <audio> to be controlled | - |
Classes
Class | Purpose | Default |
---|---|---|
- | - | - |
Values
Value | Type | Description | Default |
---|---|---|---|
- | - | - | - |
Events
Event | When | Dispatched on | event.detail |
---|---|---|---|
- | - | - | - |
Side Effects
None
How to Use
This controller is just a thin wrapper around the Javascript controls for HTML5 <video>
and <audio>
tags.