Interface VideoLayerOptions

Options for VideoLayer. Required properties are always initialised with defaults by the VideoLayer constructor.

interface VideoLayerOptions {
    width?: number;
    height?: number;
    position?: LayerPosition;
    visible: boolean;
    opacity: number;
    renderers: RendererEntry[];
    backgroundColor?: string;
    backgroundOpacity?: number;
    borderColor?: string;
    borderWidth?: number;
    loop: boolean;
    autoplay: boolean;
    pauseOnHide: boolean;
    stopOnHide: boolean;
    src?: string;
    videoWidth?: number;
    videoHeight?: number;
}

Hierarchy (view full)

Properties

width?: number

Layer canvas width in pixels. Defaults to DMD width.

height?: number

Layer canvas height in pixels. Defaults to DMD height.

position?: LayerPosition

Layer position within the DMD frame.

visible: boolean

Whether the layer is visible. Default: true.

opacity: number

Layer opacity between 0 (transparent) and 1 (opaque). Default: 1.

renderers: RendererEntry[]

Renderers to register (and optionally activate) on this layer. Each entry is either a RendererInstanceEntry (pre-created instance) or a RendererClassEntry (class instantiated by the layer with the correct dimensions). Set active: false to register without activating. Default: [].

backgroundColor?: string

Background fill color drawn behind the layer content. Transparent if omitted.

backgroundOpacity?: number

Background fill opacity 0–1. Default: 1.

borderColor?: string

Border stroke color drawn around the layer edge. No border if omitted.

borderWidth?: number

Border stroke width in pixels. Default: 0.

loop: boolean

Whether the video loops. Default: false.

autoplay: boolean

Whether the video starts playing immediately. Default: false.

pauseOnHide: boolean

Pause playback when the layer is hidden. Default: true.

stopOnHide: boolean

Stop playback when the layer is hidden (overrides pauseOnHide). Default: false.

src?: string

Video source URL.

videoWidth?: number

Video element width in pixels (defaults to layer width).

videoHeight?: number

Video element height in pixels (defaults to layer height).