Overlay messages, can be used as call to action. These can be displayed either at specified timecodes during the video or at the end once th video has finished. They can also be triggered by a clickable hotspot.

Methods

Overlays(akita)

Item Value
Scope Constructor
Returns Overlays

Parameters

Parameter Description
Object di DI object

Initialise the overlays plugin


createOverlayElement(overlayId, data)

Item Value
Scope Public
Returns HTMLElement

Parameters

Parameter Description
String overlayId An overlayID
Object data Overlay data from availableOverlays

Creates an overlay element


Properties

availableOverlays

Item Value
Scope public
Returns Object

Returns all overlay objects for current schedule item

{
    iaWXJzh: {
        show: {
            at_end: "0",
            during: {
                start: "00:11",
                end: "00:15"
            }
        },
        title: "345435",
        description: "345345345",
        image_path: "",
        link_text: "345345345",
        link_action: "javascript",
        link_url: null,
        link_target: null,
        link_javascript_code: "",
        language: "en-GB",
        width: "100",
        height: "30"
    }
}

overlayElements

Item Value
Scope public
Returns Object

Returns all overlay DOM elements for current schedule item

{
    iaWXJzh: <HTMLElement>
}

shown

Item Value
Scope public
Returns Array

Returns a list of ids for overlay objects that have been shown

['iaWXJzh', 'idas9Sd'];

showing

Item Value
Scope public
Returns Array

Returns a list of ids for overlay objects that are currently showing

['iaWXJzh'];

enabled

Item Value
Scope public
Returns Boolean

Returns if overlays are enabled


Events

overlaysPluginInitialised

Fired on plugin being initialised


overlaysPluginReady

Fired on plugin being ready to interact with


overlaysEnabled

Fired on Overlays.enable()


overlaysDisabled

Fired on Overlays.disable()


overlayCuepoint

Fired when hitting a cuepoint, either a show or hide type

{
    overlayId:"iaWXJzh",
    cuepoint:"show"
}

overlayClicked

fired when an overlay is clicked

{
    overlayId:"iaWXJzh"
}

overlaysEnabled

fired when an overlay is clicked


overlaysDisabled

fired when an overlay is clicked


Listeners

showOverlay

Parameters

Parameter Description
String overlayId ID of the overlay you wish to show

Show a particular overlay

player.eventEmitter.emit('showOverlay', {
    data: {
        overlayId: 'iaWXJzh'
    }
});

hideOverlay

Parameters

Parameter Description
String overlayId ID of the overlay you wish to hide

Hide a particular overlay

player.eventEmitter.emit('hideOverlay', {
    data: {
        overlayId: 'iaWXJzh'
    }
});