Options
| Option | Default | Description |
|---|---|---|
theme | default | One of the eight built-in theme names. |
autoplay | false | Requests autoplay through the browser. |
muted | false | Starts the player muted. |
controls | true | Shows interactive controls. |
loop | false | Loops playback. |
preload | metadata | Native video preload mode. |
volume | 1 | Initial volume from 0 to 1. |
playbackRate | 1 | Initial playback speed. |
aspectRatio | 16:9 | Applies a player aspect-ratio class. |
shortcuts | true | Enables keyboard interactions. |
hideControlsDelay | 3000 | Inactivity delay in milliseconds. |
Example
const player = new Sopplayer('#player', {
theme: 'duolingo',
volume: 0.8,
playbackRate: 1,
aspectRatio: '16:9',
shortcuts: true
});