Viewability

Endpoints

MethodDescription
.getPercentViewable()Returns a number between 0 and 1 that represents the player's visible percentage. If the player is completely out of the viewport or if it is in an inactive tab, this getter returns.
.getViewable()This getter will return 1 if 50% of the player is in view and is in the active tab. If it is below 50% or is in an inactive tab, it will return 0.


Events

MethodDescription
.on('viewable')When the player is viewable, a viewable event is fired with a viewable value of 1. When hidden, it fires with a value of 0.