Video Input

📺 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 defaultValue is given, the default value is null.

Setting Definition
type VideoInputSetting = {
  type: 'video-input'
  label: string
  id: string
  multiple: true
  defaultValue?: string[]
  description?: string
}

If no defaultValue is 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 }

Video Input Preview