コード例 #1
0
 /** gets any defiend on-page uiConf js */
 private function getPerUiConfJS()
 {
     if (!$this->getResultObject() || !isset($this->getResultObject()->urlParameters['uiconf_id']) || !isset($this->getResultObject()->urlParameters['wid']) && !isset($this->getResultObject()->urlParameters['p'])) {
         // directly issue the UiConfJs callback
         return 'kWidget.inLoaderUiConfJsCallback();';
     }
     // load the onPage js services
     $mweUiConfJs = new mweApiUiConfJs();
     // output is set to empty string:
     $o = '';
     // always include UserAgentPlayerRules:
     $o .= $mweUiConfJs->getUserAgentPlayerRules();
     // support including special player rewrite flags if set in uiConf:
     if ($this->getResultObject()->getPlayerConfig(null, 'Kaltura.LeadWithHTML5') === true) {
         $o .= "\n" . 'mw.setConfig(\'Kaltura.LeadWithHTML5\', true );';
     }
     if ($this->getResultObject()->getPlayerConfig(null, 'Kaltura.ForceFlashOnIE10') === true) {
         $o .= "\n" . 'mw.setConfig(\'Kaltura.ForceFlashOnIE10\', true );' . "\n";
     }
     // Only include on page plugins if not in iframe Server
     if (!isset($_REQUEST['iframeServer'])) {
         $o .= $mweUiConfJs->getPluginPageJs('kWidget.inLoaderUiConfJsCallback');
     } else {
         $o .= 'kWidget.inLoaderUiConfJsCallback();';
     }
     // set the flag so that we don't have to request the services.php
     $o .= "\n" . 'kWidget.uiConfScriptLoadList[\'' . $mweUiConfJs->getResultObject()->urlParameters['uiconf_id'] . '\'] = 1; ';
     return $o;
 }