Video

This element renders a embedded video.​​​​​​​

Interface

interface IVideo extends IElement {
  url: string;
  openUrl?: string;
  autoplay?: boolean;
  controls?: boolean;
  muted?: boolean;
  onChangePlay?: {
    dataPropToUpdate: string;
  };
}

Example

Video
{
  "type": "Video",
  "url": "{fields.videoUrl}",
  "controls": "{video.isPlaying}",
  "horizontalSeparator": false,
  "onChangePlay": {
    "dataPropToUpdate": "video.isPlaying"
  },
  "style": {
    "objectFit": "cover",
    "height": "400px",
    "borderRadius": "8px",
    "width": "100%"
  }
}

Properties

type

Must be “Video”.

  • Type: "Video"

  • Required: Yes

url

Video url(Youtube, Vimeo, SharePoint, File).

  • Type: string

  • Required: Yes

openUrl

Url that will open in a new tab. If not informed, the video url will be used.

  • Type: string

  • Required: No

autoplay

Start video automatically.

  • Type: boolean

  • Required: No

controls

Show video controls.

  • Type: boolean

  • Required: No

muted

Whether the video is muted by default.

  • Type: boolean

  • Required: No

onChangePlay

Modifies the status and saves in the specified state property whether the video is playing or paused.

  • Type:
interface IOnChangePlay {
  dataPropToUpdate: string; // the property path of the data that we want to update with the result returned by the action.
}
  • Required: No