|
|
|
@ -8,9 +8,20 @@ |
|
|
|
|
* @author Arnaud Ligot <arnaud@cblue.be> |
|
|
|
|
*/ |
|
|
|
|
global $_configuration; |
|
|
|
|
$audio_recorder_studentview = false; |
|
|
|
|
$audio_recorder_tutorview = api_is_course_tutor(); |
|
|
|
|
$web_path = api_get_path(WEB_CODE_PATH); |
|
|
|
|
if($audio_recorder_studentview) |
|
|
|
|
if($audio_recorder_tutorview) |
|
|
|
|
{ |
|
|
|
|
$width = 295; |
|
|
|
|
$height= 90; |
|
|
|
|
$player = 'recorder2.swf'; |
|
|
|
|
$server = (api_get_setting('service_visio','visio_use_rtmpt')=='true'?'rtmpt://':'rtmp://').api_get_setting('service_visio','visio_host').':'.(api_get_setting('service_visio','visio_use_rtmpt')=='true'?'80':api_get_setting('service_visio','visio_port')).'/recorder'; |
|
|
|
|
$post_uri = urlencode($web_path.'conference/audiopost.php?course_code='.api_get_course_id().'&user_id='.api_get_user_id().'&checker='.md5(api_get_course_id().api_get_user_id().gmdate('Ymd').$_configuration['security_key'])); |
|
|
|
|
//$filename = str_replace('.','dot',substr($web_path,strpos($web_path,'://')+3,-1)).'-z-'.api_get_course_id().'-z-'.api_get_user_id().'-z-'.gmdate('YmdHis').'.flv';//using -z- as fields splitter |
|
|
|
|
$filename = $mylpid.'-'.$mylpitemid.'-'.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; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$width = 295; |
|
|
|
|
$height = 24; |
|
|
|
@ -28,17 +39,6 @@ if($audio_recorder_studentview) |
|
|
|
|
$path_to_lzx = $web_path.'conference/'.$player.'?uri='.$filepath.'&autostart=true'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$width = 295; |
|
|
|
|
$height= 90; |
|
|
|
|
$player = 'recorder2.swf'; |
|
|
|
|
$server = (api_get_setting('service_visio','visio_use_rtmpt')=='true'?'rtmpt://':'rtmp://').api_get_setting('service_visio','visio_host').':'.(api_get_setting('service_visio','visio_use_rtmpt')=='true'?'80':api_get_setting('service_visio','visio_port')).'/recorder'; |
|
|
|
|
$post_uri = urlencode($web_path.'conference/audiopost.php?course_code='.api_get_course_id().'&user_id='.api_get_user_id().'&checker='.md5(api_get_course_id().api_get_user_id().gmdate('Ymd').$_configuration['security_key'])); |
|
|
|
|
//$filename = str_replace('.','dot',substr($web_path,strpos($web_path,'://')+3,-1)).'-z-'.api_get_course_id().'-z-'.api_get_user_id().'-z-'.gmdate('YmdHis').'.flv';//using -z- as fields splitter |
|
|
|
|
$filename = $mylpid.'-'.$mylpitemid.'-'.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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!empty($path_to_lzx)){ |
|
|
|
|
printf("<object type=\"application/x-shockwave-flash\" data=\"%s\" |
|
|
|
|