name: field.blocks.video.name
icon: video
preview: video
fields:
  location:
    label: field.blocks.video.location
    type: radio
    columns: 2
    default: "kirby"
    options:
      kirby: "{{ t('field.blocks.image.location.internal') }}"
      web: "{{ t('field.blocks.image.location.external') }}"
  url:
    label: field.blocks.video.url.label
    type: url
    placeholder: field.blocks.video.url.placeholder
    when:
      location: web
  video:
    label: field.blocks.video.name
    type: files
    query: page.getmixedvideos
    multiple: false
    uploads:
      template: video
    when:
      location: kirby
  poster:
    label: field.blocks.video.poster
    type: files
    query: page.getmixedimages
    multiple: false
    image:
      back: black
    uploads:
      template: image
    when:
      location: kirby
  alt:
    label: Titel
    type: text
    inline: true
    help: Wird vom ScreenReader vorgelesen.
  caption:
    label: field.blocks.video.caption
    type: writer
    inline: true
    marks:
      - bold
      - italic
      - underline
      - strike
      - clear
    help: Reguläre, visuelle Videolegende
  description:
    label: Beschreibung (für Accessibility)
    type: writer
    marks:
      - bold
      - italic
      - underline
      - strike
      - clear
    inline: true
    help: Eine Art Zusammenfassung. Wird vom ScreenReader erkannt und vorgelesen.

  autoplay:
    label: field.blocks.video.autoplay
    type: toggle
    width: 1/3
    when:
      location: kirby
  muted:
    label: field.blocks.video.muted
    type: toggle
    width: 1/3
    default: true
    when:
      location: kirby
  loop:
    label: field.blocks.video.loop
    type: toggle
    width: 1/3
    when:
      location: kirby
  controls:
    label: field.blocks.video.controls
    type: toggle
    width: 1/3
    default: true
    when:
      location: kirby
  preload:
    label: field.blocks.video.preload
    type: select
    width: 2/3
    default: auto
    options:
      - auto
      - metadata
      - none
    when:
      location: kirby

  # h_a11yline:
  #   type: line
  #   when:
  #     location: kirby
  # h_a11yheader:
  #   type: headline
  #   label: Extra Accessibility-Dateien für Player
  #   when:
  #     location: kirby

  # # vtt
  # vtt_description:
  #   label: Audiobeschreibung in Video
  #   type: files
  #   multiple: false
  #   max: 1
  #   help: Für **blinde** Menschen. Wird im Videoplayer automatisch geladen (Aduio Beschreibung synchron zum Video).
  #   uploads: document
  #   query: page.files.filterBy('template', 'document')
  #   when:
  #     location: kirby
  # vtt_description_lang:
  #   label: Sprache - Beschreibung in Video
  #   type: select
  #   options:
  #     - de
  #     - en
  #   when:
  #     location: kirby
  # vtt_description_label:
  #   label: Label (im Player) - Audiobeschreibung in Video
  #   type: text
  #   when:
  #     location: kirby

  # vtt_line_1:
  #   type: line
  #   when:
  #     location: kirby

  # vtt_captions:
  #   label: Captions
  #   type: files
  #   multiple: false
  #   max: 1
  #   help: Für **taube** Menschen. Wird im Videoplayer automatisch geladen (Captions bzw. Untertitel).
  #   uploads: document
  #   query: page.files.filterBy('template', 'document')
  #   when:
  #     location: kirby
  # vtt_captions_lang:
  #   label: Sprache - Captions
  #   type: select
  #   options:
  #     - de
  #     - en
  #   when:
  #     location: kirby
  # vtt_captions_label:
  #   label: Label (im Player) - Captions
  #   type: text
  #   when:
  #     location: kirby

  # vtt_line_2:
  #   type: line
  #   when:
  #     location: kirby

  # vtt_subtitles:
  #   label: Untertitel
  #   type: files
  #   multiple: false
  #   max: 1
  #   help: Für Nicht-Muttersprachler. Nur 1 Track ist hier erlaubt, es wird empfohlen Englisch zu verwenden. Wird im Videoplayer automatisch geladen (Untertitel).
  #   uploads: document
  #   query: page.files.filterBy('template', 'document')
  #   when:
  #     location: kirby
  # vtt_subtitles_lang:
  #   label: Sprache - Untertitel
  #   type: text
  #   when:
  #     location: kirby
  # vtt_subtitles_label:
  #   label: Titel - Untertitel
  #   type: text
  #   when:
  #     location: kirby
