Documentation

Events

Global events subscription is available

BX.addCustomEvent('PlayerManager.Player:onAfterInit', function(player)
{
    // player - object BX.Fileman.Player
});

List of events

Event Is Called Available from version
PlayerManager.Player:onCreate when creating a player instance
PlayerManager.Player:onBeforeInit before initialization
PlayerManager.Player:onAfterInit after initialization
PlayerManager.Player:onSetSource after source is set via setSource()
PlayerManager.Player:onKeyDown after a keyboard key is clicked, when player is in focus
PlayerManager.Player:onPlay after playback started
PlayerManager.Player:onPause after playback stopped
PlayerManager.Player:onClick when clicking on player node
PlayerManager.Player:onError when (any) error occurs. At the moment, the error itself isn't sent anywhere.
PlayerManager.Player:onEnded after track has finished playing


Subscribing to a specific player instance is a rare case.

BX.addCustomEvent(player, 'eventName', function(player, eventName){
	// player - объект BX.Fileman.Player
	// eventName - event name
})

List of events for specific instance

Event Is Called Available from version
Player:onCreate When creating a player instance
Player:onBeforeInit Before initialization
Player:onAfterInit After initialization
Player:onSetSource After source is set via setSource()
Player:onKeyDown after a keyboard key is clicked, when player is in focus
Player:onPlay after playback started
Player:onPause after playback stopped
Player:onClick when clicking on player node
Player:onError when (any) error occurs. At the moment, the error itself isn't sent anywhere.
Player:onEnded after track has finished playing


© «Bitrix24», 2001-2024