Source for file audiorecorder.inc.php
Documentation is available at audiorecorder.inc.php
// This file is part of the Dokeos software - See license and credits in the documentation/ directory
* Include the lazlo file necessary to use the audiorecorder
* @author Sebastian Wagner <seba.wagner@gmail.com>
* @author Eric Marguin <e.marguin@elixir-interactive.com>
* @author Arnaud Ligot <arnaud@cblue.be>
require_once($getid3_path. "getid3/getid3.php");
$getid3->encoding = 'UTF-8';
$getid3->Analyze($flv_path);
return $getid3->info['playtime_seconds'];
if($audio_recorder_studentview== 'false')
$player = 'recorder2.swf';
$filename = 'lpi'. $audio_recorder_item_id. '-'. gmdate('YmdHis'). api_get_user_id(). '.flv';//using -z- as fields splitter
$path_to_lzx = $web_path. 'conference/'. $player. '?server='. urlencode($server). '&postURI='. $post_uri. '&filename='. $filename;
$select = "SELECT * FROM $docs " .
" WHERE path like BINARY '/audio/lpi". Database::escape_string($audio_recorder_item_id). "-%' AND filetype='file' " .
//$filepath = api_get_path(WEB_COURSE_PATH).$cp.'/document'.$row['path'];
$path_to_lzx = $web_path. 'conference/'. $player. '?uri='. urlencode($filepath). '&autostart=true&duration='. $duration;
if(!empty($path_to_lzx)){
$recorder_content = sprintf("<object type=\"application/x-shockwave-flash\" data=\"%s\" ".
"width='$width' height='$height'>".
"<param name=\"movie\" value=\"%s\">".
"<param name=\"quality\" value=\"high\">".
"<param name=\"scale\" value=\"noscale\">".
"<param name=\"salign\" value=\"LT\">".
"<param name=\"menu\" value=\"false\"></object>",$path_to_lzx,$path_to_lzx);
if($audio_recorder_studentview== 'false')
echo '<script type="text/javascript">
function show_audiorecorder()
document.getElementById("audiorecorder_frame").innerHTML = "'. addslashes($recorder_content). '";
document.getElementById("show_audiorecorder_div").style.display="none";
echo '<div id="show_audiorecorder_div"><a style="cursor:pointer" onclick="show_audiorecorder()">'. get_lang('ShowAudioRecorder'). '</a></div>';
echo '<div id="audiorecorder_frame"></div>';
|