//fo.addVariable("ShotsWidth","200");//The width of snapshots, in pixels. //fo.addVariable("genAllShots","true");//Preview shots (like the samples on the Shots Width page) will be generated for all linked maps when your main map loads. If you have a lot of linked maps, this could take some time to complete //fo.addVariable("unfoldAll","true"); //For each mindmap loaded start the display with all nodes unfolded. Another variable to be wary of! //fo.addVariable("toolTipsBgColor","0xaaeeaa");: bgcolor for tooltips ej;"0xaaeeaa" //fo.addVariable("defaultWordWrap","300"); //default 600 // fo.write("flashcontent"); // ]]> </script> <?php } if ($is_nanogong_available) { $file_url_web = DocumentManager::generateAudioTempFolder($file_url_sys); echo '<div align="center">'; echo '<a class="btn btn-default" href="' . $file_url_web . '" target="_blank"><em class="fa fa-download"></em> ' . get_lang('Download') . '</a>'; echo '<br/>'; echo '<br/>'; echo DocumentManager::readNanogongFile($to_url); // Erase temp file in tmp directory when return to documents echo '</div>'; } if ($execute_iframe) { if ($isChatFolder) { $content = Security::remove_XSS(file_get_contents($file_url_sys)); echo $content; } else { echo '<iframe id="mainFrame" name="mainFrame" border="0" frameborder="0" scrolling="no" style="width:100%;" height="600" src="' . $file_url_web . '&rand=' . mt_rand(1, 10000) . '" height="500" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>'; } } Display::display_footer();
/** * @param string $file * @param array $params * @return null|string */ public static function getMediaPlayer($file, $params = array()) { $fileInfo = pathinfo($file); switch ($fileInfo['extension']) { case 'wav': if (isset($params['url'])) { $url = DocumentManager::generateAudioTempFile(basename($file), $file); return DocumentManager::readNanogongFile($url); } break; case 'mp3': case 'webm': $autoplay = null; if (isset($params['autoplay']) && $params['autoplay'] == 'true') { $autoplay = 'autoplay'; } $width = isset($params['width']) ? 'width="' . $params['width'] . '"' : null; $id = isset($params['id']) ? $params['id'] : $fileInfo['basename']; $class = isset($params['class']) ? ' class="' . $params['class'] . '"' : null; $html = '<audio id="' . $id . '" ' . $class . ' controls ' . $autoplay . ' ' . $width . ' src="' . $params['url'] . '" >'; $html .= '<object width="' . $width . '" height="50" type="application/x-shockwave-flash" data="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/mediaelement/flashmediaelement.swf"> <param name="movie" value="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/mediaelement/flashmediaelement.swf" /> <param name="flashvars" value="controls=true&file=' . $params['url'] . '" /> </object>'; $html .= '</audio>'; return $html; break; } return null; }