function getSwfUrlForBaseWidget() { return KalturaHelpers::getSwfUrlForWidget(KalturaSettings_BASE_WIDGET_ID); }
{ jQuery("#playerCustomWidth").css("background-color", "red"); return false; } } return true; }); jQuery.kalturaPlayerSelector({ url: ajaxurl+'?action=kaltura_ajax&kaction=getplayers', defaultId: '<?php echo get_option("kaltura_default_player_type", $KALTURA_DEFAULT_PLAYERS[0]['id']); ?> ', swfBaseUrl: '<?php echo KalturaHelpers::getSwfUrlForWidget(); ?> ', previewId: 'divKalturaPlayer', entryId: '<?php echo $this->entry->id; ?> ', playersList: '#uiConfId', dimensions: 'input[name=playerRatio]', submit: 'input[name=sendToEditorButton]', onSelect: function() { fixHeight(); } });
function getSwfUrlForBaseWidget() { return KalturaHelpers::getSwfUrlForWidget(KALTURASETTINGS_BASE_WIDGET_ID); }
function embed_kswfdoc($entryId, $width, $height, $context_id) { global $CFG, $USER; $client = KalturaHelpers::getKalturaClient(); $kswf_player = KalturaHelpers::getPlatformKey("video_presentation", KalturaSettings_PLAY_VIDEO_PRESENTATION_UICONF_ID); $partnerId = KalturaHelpers::getPlatformKey("partner_id", "0"); $swfUrl = KalturaHelpers::getSwfUrlForWidget($partnerId); $div_id = "kaltura_wrapper_" . $entryId; $kaltura_poweredby = ''; $align = ''; $custom_style = ''; $links = ''; $config = $client->getConfig(); $context = get_context_instance(CONTEXT_COURSE, $context_id); if (has_capability('moodle/course:manageactivities', $context)) { //is admin $kc = KalturaHelpers::getKalturaClient(0, 'edit:' . $_GET['entry']); $adminvars = '"&adminMode=true"+"&partnerid=' . $config->partnerId . '"+"&subpid=' . $config->partnerId * 100 . '"+"&ks=' . $client->getKs() . '"+"&uid=' . $USER->id . '"'; } else { //is student $kc = KalturaHelpers::getKalturaClient(0, 0); $adminvars = '"&adminMode=false"+"&partnerid=' . $config->partnerId . '"+"&subpid=' . $config->partnerId * 100 . '"+"&ks=' . $client->getKs() . '"+"&uid=' . $USER->id . '"'; } $host = 'www.kaltura.com'; if ($client->getConfig()->serviceUrl != 'http://www.kaltura.com') { $host = str_replace('http://', '', $kc->config->serviceUrl); } $flashVarsStr = '"host=' . $host . '"+' . $adminvars . '+"&debugMode=1" +"&kshowId=-1"+"&pd_sync_entry=' . $entryId . '"'; $html = ' <div id="' . $div_id . '" class="kaltura_wrapper" style="' . $align . $custom_style . '"' . $embed_options['js_events'] . '>' . $links . '</div>' . $kaltura_poweredby; $html .= '<script type="text/javascript">'; $html .= 'function gotoEditorWindow(param1)'; $html .= '{'; $html .= ' onPlayerEditClick(param1);'; $html .= '}'; $html .= 'function onPlayerEditClick(param1)'; $html .= '{'; $html .= ' kalturaInitModalBox(\'' . $CFG->wwwroot . '/mod/kaltura/keditor.php?entry_id=' . '\'+param1 , {width:890, height:546});'; $html .= '}'; $html .= ' var kaltura_swf = new SWFObject("' . $swfUrl . '/uiconf_id/' . $kswf_player . '", "' . $div_id . '", "' . $width . '", "' . $height . '", "9", "#ffffff");'; $html .= ' kaltura_swf.addParam("flashVars", ' . $flashVarsStr . ');'; $html .= ' kaltura_swf.addParam("wmode", "opaque");'; $html .= ' kaltura_swf.addParam("allowScriptAccess", "always");'; $html .= ' kaltura_swf.addParam("allowFullScreen", "TRUE");'; $html .= ' kaltura_swf.addParam("allowNetworking", "all");'; $html .= ' if(kaltura_swf.installedVer.major >= 9) {'; $html .= ' kaltura_swf.write("' . $div_id . '");'; $html .= ' } else {'; $html .= ' document.getElementById("' . $div_id . '").innerHTML = "Flash player version 9 and above is required. <a href=\'http://get.adobe.com/flashplayer/\'>Upgrade your flash version</a>";'; $html .= ' }</script>'; return $html; }