📺 Video Input Setting
A video input can accept a local video file.
⚠️
Local files will only work if they exist in the widget assets folder.
If multiple is set to true, it can accept multiple video files, and gives you an array of strings.
Setting Definition
type VideoInputSetting = {
type: 'video-input'
label: string
id: string
defaultValue?: string | null
description?: string
}If no
defaultValueis given, the default value isnull.
Setting Definition
type VideoInputSetting = {
type: 'video-input'
label: string
id: string
multiple: true
defaultValue?: string[]
description?: string
}If no
defaultValueis given, the default value is an empty array[].
Example
JavaScript
addEventListener('slime2:ready', () => {
slime2.widget.loadSettings('widget-data.js', [
{
label: 'Alert Video',
id: 'alertVideo',
type: 'video-input',
},
])
})Initial Data
{ "alertVideo": null }