You are here

function KalturaHelpers::getSitePlayers in Kaltura 6.2

Same name and namespace in other branches
  1. 7.3 kaltura_client/kaltura_helpers.php \KalturaHelpers::getSitePlayers()
  2. 7.2 kaltura_client/kaltura_helpers.php \KalturaHelpers::getSitePlayers()

* oferc * @return: the list of players defined for the account

2 calls to KalturaHelpers::getSitePlayers()
KalturaHelpers::getSitePlaylistPlayers in kaltura_client/kaltura_helpers.php
* oferc this method is defined just for clearence, acctualy it is the same as regular players * @return: the list of players defined for the account
kaltura_choose_player in ./kaltura.module

File

kaltura_client/kaltura_helpers.php, line 278

Class

KalturaHelpers
functions edited getSessionUser

Code

function getSitePlayers(&$arr) {
  static $players;
  $arr['48501'] = array(
    'name' => 'Light',
    'width' => 0,
    'height' => 0,
  );
  $arr['48502'] = array(
    'name' => 'Dark',
    'width' => 0,
    'height' => 0,
  );
  if (empty($players)) {
    $players = array();
    $client = KalturaHelpers::getKalturaClient(true);
    $listResponse = $client->uiConf
      ->listAction();
    for ($i = 0; $i < $listResponse->totalCount; $i++) {
      if ($listResponse->objects[$i]->objType == KalturaUiConfObjType::PLAYER) {

        //Don't show playlist as regular player
        if (stristr($listResponse->objects[$i]->tags, "playlist") != FALSE) {
          continue;
        }
        $arr[$listResponse->objects[$i]->id] = array(
          'name' => $listResponse->objects[$i]->name,
          'width' => $listResponse->objects[$i]->width,
          'height' => $listResponse->objects[$i]->height,
        );
        $players[$listResponse->objects[$i]->id] = array(
          'name' => $listResponse->objects[$i]->name,
          'width' => $listResponse->objects[$i]->width,
          'height' => $listResponse->objects[$i]->height,
        );

        //         print($listResponse->objects[$i]->tags); //this is a KalturaUiConf object
      }
    }
  }
  else {
    foreach ($players as $key => $sitePlayer) {
      $arr[$key] = $sitePlayer;
    }
  }
}