UNA
Loading...
Searching...
No Matches
BxDolPlayer Class Reference
Inheritance diagram for BxDolPlayer:
BxDolFactory iBxDolFactoryObject BxBasePlayerHTML5 BxPlyrPlayer BxTemplPlayerHtml5

Public Member Functions

 getObjectName ()
 
 setCustomConf ($a)
 
 setVideoSize ($sName, $iSize)
 
 getSkins ($bFullInfo=false)
 
 setSkin ($sSkin)
 
 getCodeAudio ($iViewMode, $aParams, $bDynamicMode=false)
 
 getCodeVideo ($iViewMode, $aParams, $bDynamicMode=false)
 

Static Public Member Functions

static getObjectInstance ($sObject=false, $oTemplate=false)
 
- Static Public Member Functions inherited from iBxDolFactoryObject
static getObjectInstance ($sObject)
 

Protected Member Functions

 __construct ($aObject)
 
 _addJsCss ($bDynamicMode=false)
 
 _replaceMarkers ($s, $a)
 

Protected Attributes

 $_sObject
 
 $_aObject
 
 $_aConfCustom = array()
 
 $_sSkin
 
 $_aSkins
 
 $_aSizes
 

Detailed Description

Audio/Video player integration.

Site owner can choose which audio/video can be user on the site.

Default player is stored in 'sys_player_default' setting option.

Creating the Editor object:

Add record to 'sys_objects_player' table:

  • object: name of the object, in the format: vendor prefix, underscore, module prefix, underscore, internal identifier or nothing;
  • title: title of the player, displayed in the studio.
  • skin: player skin, if player suports custom/multiple skins.
  • override_class_name: user defined class name which is derived from one of base player classes.
  • override_class_file: the location of the user defined class, leave it empty if class is located in system folders.

Example of usage

Display player

$oPlayer = BxDolPlayer::getObjectInstance(); // get default player object instance
if ($oPlayer) // check if player is available for using
echo $oPlayer->getCodeVideo (BX_PLAYER_STANDARD, array(
'poster' => $sUrlPoster, // optional, but very
'mp4' => $sUrlMP4, // or array of files,
for example: array('sd' => $sUrl480, 'hd' => $sUrl720)
'webm' => $sUrlWebM, // optional, mp4 format is enough for all moders browsers
'attrs' => $aAttrs, // optional, not supported by all player implementations
'styles' => 'width:100%; height:auto;', // optional, not supported by all
players implementations
)); // output HTML player implementation
static getObjectInstance($sObject=false, $oTemplate=false)
Definition BxDolPlayer.php:97
const BX_PLAYER_STANDARD
Definition BxDolPlayer.php:14

Member Function Documentation

◆ _addJsCss()

BxDolPlayer::_addJsCss ( $bDynamicMode = false)
protected

Add css/js files which are needed for player display and functionality.

◆ _replaceMarkers()

BxDolPlayer::_replaceMarkers ( $s,
$a )
protected

Replace provided markers string.

Parameters
$s- string to replace markers in
$a- markers array
Returns
string with replaces markers

◆ getCodeAudio()

BxDolPlayer::getCodeAudio ( $iViewMode,
$aParams,
$bDynamicMode = false )

Get player HTML code

Parameters
$iViewMode- player view mode: BX_PLAYER_STANDARD, BX_PLAYER_MINI, BX_PLAYER_EMBED
$aParams- player params: mp3, ogg, attrs, styles - See usage example.
$bDynamicMode- is AJAX mode or not, the HTML with player is loaded dynamically.

Reimplemented in BxBasePlayerHTML5, and BxPlyrPlayer.

◆ getCodeVideo()

BxDolPlayer::getCodeVideo ( $iViewMode,
$aParams,
$bDynamicMode = false )

Get player HTML code

Parameters
$iViewMode- player view mode: BX_PLAYER_STANDARD, BX_PLAYER_MINI, BX_PLAYER_EMBED
$aParams- player params: poster, mp4, webm, attrs, styles - See usage example.
$bDynamicMode- is AJAX mode or not, the HTML with player is loaded dynamically.

Reimplemented in BxBasePlayerHTML5, and BxPlyrPlayer.

◆ getObjectInstance()

static BxDolPlayer::getObjectInstance ( $sObject = false,
$oTemplate = false )
static

Get player object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

◆ getObjectName()

BxDolPlayer::getObjectName ( )

Get object name

◆ getSkins()

BxDolPlayer::getSkins ( $bFullInfo = false)

Get a list of available skins.

◆ setCustomConf()

BxDolPlayer::setCustomConf ( $a)

Set custom player configuration options

◆ setVideoSize()

BxDolPlayer::setVideoSize ( $sName,
$iSize )

Set size for default resolutions: 'sd' and 'hd'

Member Data Documentation

◆ $_aSizes

BxDolPlayer::$_aSizes
protected
Initial value:
= array(
'sd' => 480,
'hd' => 720,
)

The documentation for this class was generated from the following file: