Documentation

Player

This script is located inside the bitrix:player folder of the component /bitrix/components/bitrix/player/js/fileman_player.js. Presently, it can must be connected manually.

The object BX.Fileman.PlayerManager enables access to players on the page.

Method Description Available from version
BX.Fileman.PlayerManager.getPlayerById(
   playerId
)
Main method. Returns object by its ID.
BX.Fileman.Player()
Creates an object for each player on page.
BX.Fileman.Player(
   id, 
  params
)
Method - constructor that creates new instance. Please, see description of params in source codes, the parameters are not yet finalized.

Player object API

var player = BX.Fileman.PlayerManager.getPlayerById(playerId); // get player object
Method Description Available from version
player.isPlaying() Returns true, when playback is ongoing
player.isEnded() Returns true, when playback has ended after file playback has fully finished.
player.isReady() Returns true, when player has fully initialized.
player.getElement() Returns html-node of player
player.createElement() When player is inserted into an element; returns the node (see getElement). When the node is unavailable, creates it, but does not insert it into the element.
player.setSource(source) Sets a player track. Its recommended to pass object type { src: 'path to file', type: 'mime-type'}.
player.getSource() Returns the current track.
player.mute() Mutes player sound.
player.play() Starts playback
player.pause() Stops playback


© «Bitrix24», 2001-2024