|
From: Florin C B. <ory...@us...> - 2010-08-21 00:29:12
|
Update of /cvsroot/mxbb/mx_radiocast/includes In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv20675/includes Modified Files: radiocast_player.php Log Message: Index: radiocast_player.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_player.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** radiocast_player.php 20 Aug 2010 21:14:40 -0000 1.6 --- radiocast_player.php 21 Aug 2010 00:29:04 -0000 1.7 *************** *** 346,349 **** --- 346,351 ---- } + $url_player = ''; + // // Media Center *************** *** 390,394 **** } } ! else if (( $song_filetype == 'flv') || (str_replace('rtmp://', '', $station_url))) { /* --- 392,396 ---- } } ! else if (( $station_filetype == 'flv')) { /* *************** *** 401,449 **** $template->assign_block_vars('flv', array()); ! $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); $url_video = $radiocast_root_path . 'mediaplayer.swf'; } ! else if ( ( $song_filetype == 'mod' ) ) { $template->assign_block_vars('mod', array()); ! $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); $url_video = $radiocast_root_path . 'modplayer.swf'; ! $mime_type= 'audio/x-' . $song_filetype; //application/x-mplayer2 $row_type = 'mod'; } ! else if ( ( $song_filetype == 's3m' ) || ( $song_filetype == 'ult' ) || ( $song_filetype == '.xm' ) ) { //$template->assign_block_vars('songrow.mod', array()); $template->assign_block_vars('xmod', array()); ! $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); $url_video = $radiocast_root_path . 'modplayer.swf'; ! $mime_type= 'audio/x-' . $song_filetype; //application/x-mplayer2 //$row_type = 'mod'; $row_type = 'xmod'; } ! else if ( ( $song_filetype == 'mp3' ) ) { $template->assign_block_vars('flv', array()); ! $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); $url_video = $radiocast_root_path . 'mediaplayer.swf'; $mime_type= 'audio/x-mpeg'; //application/x-mplayer2 $row_type = 'flv'; } ! else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) { ! $url_download = !empty($thissong['song_url']) ? $thissong['song_url'] : mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); $url_video = $url_download; $row_type = 'img'; ! $song_filename = $thissong['song_filename']; $template->assign_block_vars('img', array( 'VIDEO_URL' => $url_video, ! 'SONG_URL' => $url_video )); } ! else if( ($song_filetype == 'pls') && !empty($thissong['song_url']) ) { $template->assign_block_vars('media', array()); ! $url_download = mx_append_sid($module_root_path . 'galerie_media.' . $phpEx . '?music_mode=music_stream&song_id=' . $song_id); $lang['Download'] = ( !empty($lang['Listen']) ? $lang['Listen'] : 'Listen URL' ); $url_video = $url_download; --- 403,465 ---- $template->assign_block_vars('flv', array()); ! $url_download = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_download&station_id=$station_id")); $url_video = $radiocast_root_path . 'mediaplayer.swf'; } ! else if (str_replace('rtmp://', 'rtmp://', $station_url)) ! { ! /* ! if ( !is_object($mx_page) ) ! { ! $mx_page = new mx_page(); ! } ! $mx_page->add_footer_text( $radiocast_root_path . 'music_player.js', true ); ! */ ! ! $template->assign_block_vars('streamer', array()); ! $url_download = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_download&station_id=$station_id")); ! $url_video = $radiocast_root_path . 'mediaplayer.swf'; ! } ! else if ($station_filetype == 'mod') { $template->assign_block_vars('mod', array()); ! $url_download = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_download&station_id=$station_id")); $url_video = $radiocast_root_path . 'modplayer.swf'; ! $mime_type= 'audio/x-' . $station_filetype; //application/x-mplayer2 $row_type = 'mod'; } ! else if (( $station_filetype == 's3m' ) || ( $station_filetype == 'ult' ) || ( $station_filetype == '.xm' )) { //$template->assign_block_vars('songrow.mod', array()); $template->assign_block_vars('xmod', array()); ! $url_download = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_download&station_id=$station_id")); $url_video = $radiocast_root_path . 'modplayer.swf'; ! $mime_type= 'audio/x-' . $station_filetype; //application/x-mplayer2 //$row_type = 'mod'; $row_type = 'xmod'; } ! else if ( ( $station_filetype == 'mp3' ) ) { $template->assign_block_vars('flv', array()); ! $url_download = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_download&station_id=$station_id")); $url_video = $radiocast_root_path . 'mediaplayer.swf'; $mime_type= 'audio/x-mpeg'; //application/x-mplayer2 $row_type = 'flv'; } ! else if ( ( $station_filetype == 'jpg' ) || ( $station_filetype == 'gif' ) || ( $station_filetype == 'png' ) ) { ! $url_download = !empty($thissong['station_url']) ? $thissong['station_url'] : mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_download&station_id=$station_id")); $url_video = $url_download; $row_type = 'img'; ! $station_filename = $thissong['station_filename']; $template->assign_block_vars('img', array( 'VIDEO_URL' => $url_video, ! 'station_URL' => $url_video )); } ! else if( ($station_filetype == 'pls') && !empty($thissong['station_url']) ) { $template->assign_block_vars('media', array()); ! $url_download = mx_append_sid($module_root_path . 'galerie_media.' . $phpEx . '?radiocast_mode=music_stream&station_id=' . $station_id); $lang['Download'] = ( !empty($lang['Listen']) ? $lang['Listen'] : 'Listen URL' ); $url_video = $url_download; *************** *** 523,526 **** --- 539,565 ---- } + $url_media = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . 'media' . "&stream_mode=" . $stream_mode . "&block_mode=" . $block_mode, false)); + $url_real = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . 'real' . "&stream_mode=" . $stream_mode . "&block_mode=" . $block_mode, false)); + $url_forced = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . $player_mode . "&stream_mode=" . 'forced' . "&block_mode=" . $block_mode, false)); + $url_window = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . $player_mode . "&stream_mode=" . $stream_mode . "&block_mode=" . 'true', true)); + + switch ($song_filetype) + { + case 'flv': + case 'mp3': + $url_station = PORTAL_URL. str_replace('./', '/', RADIOCAST_UPLOAD_PATH) . $thissong['song_filename']; + break; + + case 'mod': + case 's3m': + case 'ult': + case '.xm': + $url_station = PORTAL_URL. str_replace('./', '/', RADIOCAST_UPLOAD_PATH) . $thissong['song_filename']; + break; + + default: + break; + } + if( empty($url_station) ) { *************** *** 529,536 **** } ! $url_media = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . 'media' . "&stream_mode=" . $stream_mode . "&block_mode=" . $block_mode, false)); ! $url_real = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . 'real' . "&stream_mode=" . $stream_mode . "&block_mode=" . $block_mode, false)); ! $url_forced = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . $player_mode . "&stream_mode=" . 'forced' . "&block_mode=" . $block_mode, false)); ! $url_window = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=" . $station_id . "&player_mode=" . $player_mode . "&stream_mode=" . $stream_mode . "&block_mode=" . 'true', true)); $template->assign_vars(array( --- 568,576 ---- } ! $video_src = ($url_player) ? $url_player : $url_video; ! ! $mx_page->add_header_text('<link rel="videothumbnail" href="' . $img_id . '" type="image/jpeg" />'); ! $mx_page->add_header_text('<link rel="image_src" href="' . $img_id . '" />'); ! $mx_page->add_header_text('<link rel="video_src" href="' . $video_src . '" />'); $template->assign_vars(array( *************** *** 560,565 **** 'STATION_URL' => $thisstation['station_url'], ! ! 'VIDEO_URL' => $url_video, 'STATION_DESC' => nl2br($thisstation['station_desc']), --- 600,609 ---- 'STATION_URL' => $thisstation['station_url'], ! ! 'VIDEO_URL' => !empty($url_player) ? $url_player : $url_video, ! ! 'FLASH_PLAYER' => $music_root_path . 'mediaplayer.swf', ! ! 'DUMMY_FLV' => PORTAL_URL. str_replace('./', '/', RADIOCAST_UPLOAD_PATH) . 'no_image.flv', 'STATION_DESC' => nl2br($thisstation['station_desc']), *************** *** 604,607 **** --- 648,662 ---- 'WIDTH' => ( !empty($media_width) ? $media_width : '320' ), 'HEIGHT' => ( !empty($media_height) ? $media_height : '300' ), + + 'FLASH' => 'flash', + 'STREAMER' => 'streamer', + 'RAM' => 'ram', + 'FLASHVIDEO' => 'flashvideo', + 'YOUTUBE' => 'youtube', + 'QT' => 'qt', + 'FLV' => 'flv', + 'MOD' => 'mod', + 'IMG' => 'img', + 'MEDIA' => 'media', 'L_RATING' => $lang['Rating'], |