[svn r15264] new audio recorder with timebar + bug fixing

skala
Arnaud Ligot 17 years ago
parent e9b2206892
commit 5e5ea052fa
  1. 7
      main/conference/audiopost.php
  2. BIN
      main/conference/player2.swf
  3. 22
      main/newscorm/audiorecorder.inc.php

@ -7,6 +7,11 @@ require('../inc/global.inc.php');
// check the request comes from our red5 server
$ips = gethostbynamel(api_get_setting('service_visio','visio_host'));
$is_our_server = false;
// ignoring null file
if ($_FILES["file"]["size"] == 0)
exit(0);
if(is_array($ips))
{
foreach($ips as $ip)
@ -73,4 +78,4 @@ else
{
error_log(__FILE__.':'.__LINE__.': Attempting to save file but coming from unknown source',0);
}
?>
?>

Binary file not shown.

@ -9,6 +9,23 @@
*/
global $_configuration;
$web_path = api_get_path(WEB_CODE_PATH);
$getid3_path = api_get_path(LIBRARY_PATH);
require_once($getid3_path."getid3/getid3.php");
function getFLVDuration($flv_path) {
$getid3 = new getID3;
$getid3->encoding = 'UTF-8';
try {
$getid3->Analyze($flv_path);
return $getid3->info['playtime_seconds'];
} catch (Exception $e) {
return 0;
}
}
if($audio_recorder_studentview=='false')
{
$width = 295;
@ -34,8 +51,9 @@ else
{
$row = Database::fetch_array($res);
//$filepath = api_get_path(WEB_COURSE_PATH).$cp.'/document'.$row['path'];
$duration = getFLVDuration(api_get_path(SYS_COURSE_PATH).$cp.'/document'.$row['path']);
$filepath = api_get_path(WEB_CODE_PATH).'document/download.php?'.api_get_cidreq().'&doc_url='.$row['path'];
$path_to_lzx = $web_path.'conference/'.$player.'?uri='.$filepath.'&autostart=true';
$path_to_lzx = $web_path.'conference/'.$player.'?uri='.urlencode($filepath).'&autostart=true&duration='.$duration;
}
}
@ -48,4 +66,4 @@ if(!empty($path_to_lzx)){
<param name=\"salign\" value=\"LT\">
<param name=\"menu\" value=\"false\"></object>",$path_to_lzx,$path_to_lzx);
}
?>
?>

Loading…
Cancel
Save