Controls

This API call allows developers to interact with the built-in player controls (control bar and display icons).

Endpoints

MethodDescription
.addButton(img, tooltip, callback, id, btnClass)Adds a custom button to the player's control bar.
.addCues([cues])Adds an array of cues to the existing cues displayed on the time slider
.getControls()NA
.getCues()NA
.getSafeRegion()Used to ensure that any visual assets don't overlap with JW Player controls.
.removeButton(id)Removes a custom button from the control bar.
.setAllowFullscreen(allowFullscreen)NA
.setControls(state)NA
.setCues([cues])Sets the cues displayed on the time slider.


Events

MethodDescription
.on('controls')Fired when controls are enabled or disabled by a script.
.on('displayClick')Fired when a user clicks the video display. Especially useful for wiring your own controls when the built-in ones are disabled.