Background
Image, video, slideshow or YouTube as background.
Options
| Option | Default | Description |
|---|---|---|
Config.UI.background.mode | 'image' | 'image', 'video', 'slideshow' or 'youtube' |
Config.UI.background.image | 'media/background.jpg' | Image for mode image |
Config.UI.background.video | 'media/background.webm' | Video for mode video. Plays muted in a loop |
Config.UI.background.slideshow | { 'media/background.jpg' } | Images for mode slideshow |
Config.UI.background.slideshowInterval | 8000 | Milliseconds per image, at least 3000 |
Config.UI.background.youtubeId | '' | Only the video ID, e.g. dQw4w9WgXcQ. Plays muted in a loop |
Config.UI.background.fallback | 'media/background.jpg' | Sits below video and YouTube and stays visible when they fail |
Config.UI.background.dim | 0.35 | Darkening from 0.0 to 1.0 |
Video not included
media/background.webm is only an example path. Put your own video into html/media/ before you use mode = 'video'.
Example: slideshow
config.lua
background = {
mode = 'slideshow',
slideshow = { 'media/image1.jpg', 'media/image2.jpg', 'media/image3.jpg' },
slideshowInterval = 8000,
fallback = 'media/image1.jpg',
dim = 0.35,
},Files
- Images: jpg or webp in
html/media/, ideally under 500 KB - Video: webm (VP9) or mp4 (H.264) in
html/media/. Keep it short and small, every player downloads it while connecting - YouTube needs an internet connection on the player side
- Only use images and videos you have the rights to
Was this page helpful?
