Learn how to configure Hugo Video.js Module.
Become a backer or sponsor to support our work.
css_url| Name | Context | Type | Required | Default | Since | Example | 
|---|---|---|---|---|---|---|
| css_url | video_js | string | - | https://unpkg.com/video.js/dist/video-js.min.css | - | - | 
The style URL.
js_url| Name | Context | Type | Required | Default | Since | Example | 
|---|---|---|---|---|---|---|
| js_url | video_js | string | - | https://unpkg.com/video.js/dist/video.min.js | - | - | 
The JavaScript URL.
lang_js_url| Name | Context | Type | Required | Default | Since | Example | 
|---|---|---|---|---|---|---|
| lang_js_url | video_js | string | - | https://unpkg.com/video.js/dist/lang/%s.js | - | - | 
The localization URL, %s is the placeholder of language, please do not change it.
playback_rates| Name | Context | Type | Required | Default | Since | Example | 
|---|---|---|---|---|---|---|
| playback_rates | video_js | array | - | [0.5, 1, 1.5, 2] | - | - | 
The playback rates.
skip_forward| Name | Context | Type | Required | Default | Since | Example | 
|---|---|---|---|---|---|---|
| skip_forward | video_js | number | - | - | - | - | 
the time to skip forward, in seconds.
Available options: 5, 10, 30.
skip_backward| Name | Context | Type | Required | Default | Since | Example | 
|---|---|---|---|---|---|---|
| skip_backward | video_js | number | - | - | - | - | 
the time to skip backward, in seconds.
Available options: 5, 10, 30.
hugo.yaml
 1params:
 2  video_js:
 3    css_url: https://unpkg.com/video.js/dist/video-js.min.css
 4    js_url: https://unpkg.com/video.js/dist/video.min.js
 5    lang_js_url: https://unpkg.com/video.js/dist/lang/%s.js
 6    playback_rates:
 7    - 0.5
 8    - 1
 9    - 1.5
10    - 2
hugo.toml
1[params]
2  [params.video_js]
3    css_url = 'https://unpkg.com/video.js/dist/video-js.min.css'
4    js_url = 'https://unpkg.com/video.js/dist/video.min.js'
5    lang_js_url = 'https://unpkg.com/video.js/dist/lang/%s.js'
6    playback_rates = [0.5, 1, 1.5, 2]
hugo.json
 1{
 2   "params": {
 3      "video_js": {
 4         "css_url": "https://unpkg.com/video.js/dist/video-js.min.css",
 5         "js_url": "https://unpkg.com/video.js/dist/video.min.js",
 6         "lang_js_url": "https://unpkg.com/video.js/dist/lang/%s.js",
 7         "playback_rates": [
 8            0.5,
 9            1,
10            1.5,
11            2
12         ]
13      }
14   }
15}
video_js| Name | Context | Type | Required | Default | Since | Example | 
|---|---|---|---|---|---|---|
| video_js | - | boolean | - | false | - | - | 
Indicate the current page is using Video.js to load the CSS and JS.
You don’t have to specify the video_js when using shortcode, since this module is able to recognize the pages that using Video.js.