Class: Controls

Zenterac. Controls

new Controls()

Video controls UI, access with player.UI
Example
 var player = Zenterac.create('demo','vframe'); 
var UI = player.UI;

Members

overlay :bool

If set to true, control bar will overlay video
Example
 player.UI.overlay = true;

Methods

hide(id)

Hide a UI item: 'play', 'restart', 'next', 'quality', 'fullscreen', 'controls', 'loading', 'logo'
Parameters:
Name Type Description
id String the name of the item
Example
 player.UI.hide('logo');

isHidden() → {Bool}

True if controls are hidden

show(id)

Show a UI item: 'play', 'restart', 'next', 'quality', 'fullscreen', 'controls', 'loading', 'logo'
Parameters:
Name Type Description
id String the name of the item
Example
 player.UI.show('next');

showHide(id, show)

Show or hide a UI item
Parameters:
Name Type Description
id String the name of the item
show Bool show/hide
Example
 player.UI.showHide('controls', false);

spaceEvent()

The event used to play/pause on space bar keypress
Example
 You can remove this event with: document.removeEventListener("keypress", player.UI.spaceEvent);