Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VideoLayer

Represents a layer

Hierarchy

  • VideoLayer

Implements

Indexable

[key: string]: any

Represents a layer

Index

Constructors

constructor

Properties

Optional appendToLayers

appendToLayers: boolean

By default all the layers are appended to the [[layerContainer]] To avoid this behavior, set appendToLayers to false

Optional content

content: string

Raw content to use as layer. The content will be appended to a new div Note this option is optional if 'element' is provided

example

content:"Some text"//will create <div class="c-video-layers__layer">Some text</div>

example

content:"<strong>Some text</strong>"//will create <div class="c-video-layers__layer"><strong>Some text</strong></div>

Optional cssClass

cssClass: string

Css classes to add to the element. Useful when the content option is used. Multiple classes could be provided separated by space

example

cssClass:"someClassToAdd anotherClassToAdd"

Optional element

element: string | JQuery | Element

Element to use. Could be a valid jquery selector, a jquery object or an element object Note this option is optional if 'content' is provided

example

element:".some-query"

example

element:document.querySelector(".some-query")

example

element:$(".some-query")

Optional hide

hide: any

Animation to perform to hide the layer Uses jquery ui hide if is available or jquery hide

Optional position

position: number[] | object

Position for the layer. Could be an array of numbers corresponding to left-top coordintates or a jquery ui position object. See jquery ui position If a jquery ui position object is provided, the default "of" will be the wrapper of the video If the layer is located inside the layersContainer the default behavior is positioning the layer over the video. However, the layer could be outside the video without position. Please, see the examples for more info

example

position:[20,100]//left 20, top 100

example

position:{my:"center", at:"center"}//of the jq-video-layers root element

example

position:{my:"center", at:"center",of:document.body}//the layer will be positioned relative to the body

Optional show

show: any

Animation to perform to show the layer Uses jquery ui show if is available or jquery show

Optional start

start: number

The second in which to show the layer.

Optional stop

stop: number

The second in which to hide the layer. If is not provided, the layer will not be hidden when the video time is after the start option. If the video is rewound and the video time is before the start option, the layer will be hidden

Optional styles

styles: any

Inline styles to add. Uses jquery css

example

styles:{background:"red"}

Generated using TypeDoc