<?php /** * kalturaIframe support * */ define('KALTURA_GENERIC_SERVER_ERROR', "Error getting sources from server, something maybe broken or server is under high load. Please try again."); // Setup the kalturaIframe $mykalturaIframe = new kalturaIframe(); // Do kalturaIframe video output: $mykalturaIframe->outputIFrame(); // Define the KalturaFlavorAsset that the api will blindly set as a class class KalturaFlavorAsset { } class KalturaEntryContextDataResult { } /** * Kaltura iFrame class: */ class kalturaIframe { /** * Variables set by the Frame request: */ private $playerAttributes = array('cache_st' => null, 'wid' => null, 'uiconf_id' => null, 'entry_id' => null, 'autoplay' => null); // Local flag to store whether output was came from cache or was a fresh request private $outputFromCache = false; var $playerIframeId = 'iframeVid'; var $debug = false;
<?php /** * KalturaIframe support */ // Setup the kalturaIframe global $wgKalturaIframe; $wgKalturaIframe = new kalturaIframe(); // Do kalturaIframe video output: // Start output buffering to 'catch errors' and override output if (!ob_start("ob_gzhandler")) { ob_start(); } $wgKalturaIframe->outputIFrame(); // Check if we are wrapping the iframe output in a callback if (isset($_REQUEST['callback'])) { // get the output buffer: $out = ob_get_contents(); ob_end_clean(); // Re-start the output buffer: if (!ob_start("ob_gzhandler")) { ob_start(); } header('Content-type: text/javascript'); echo htmlspecialchars($_REQUEST['callback']) . '(' . json_encode(array('content' => $out)) . ');'; } // flush the buffer. ob_end_flush(); /** * Kaltura iFrame class: */