Merge branch 'master' of dev.sourcefabric.org:campcaster

This commit is contained in:
naomiaro 2011-01-31 01:55:23 -05:00
commit 97be2562b5
7 changed files with 131 additions and 29 deletions

View file

@ -69,6 +69,7 @@ class ApiController extends Zend_Controller_Action
$fp = fopen($filepath, 'rb');
$mtype = '';
/*
// magic_mime module installed?
if (function_exists('mime_content_type')) {
$mtype = mime_content_type($file_path);
@ -81,7 +82,15 @@ class ApiController extends Zend_Controller_Action
}
//header("Content-Type: $mtype");
header("Content-Type: audio/mpeg");
*/
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if ($ext == "ogg")
header("Content-Type: audio/ogg");
else if ($ext == "mp3")
header("Content-Type: audio/mpeg");
header("Content-Length: " . filesize($filepath));
//header('Content-Disposition: attachment; filename="'.$media->getRealMetadataFileName().'"');
fpassthru($fp);

View file

@ -34,6 +34,7 @@ class LibraryController extends Zend_Controller_Action
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
$this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
$this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
$this->view->headScript()->appendFile('/js/jplayer/jquery.jplayer.min.js');
$this->view->headLink()->appendStylesheet('/css/contextmenu.css');
$this->view->headLink()->appendStylesheet('/css/pro_dropdown_3.css');

View file

@ -34,3 +34,4 @@
</ul>
</div>
</div>
<div id="jquery_jplayer_1" class="jp-jplayer" style="width:0px; height:0px;"></div>

View file

@ -3,7 +3,7 @@
<?php endif; ?>
<li class="ui-state-default" id="spl_<?php echo $this->partialCounter-1 ?>">
<a href="javascript:void(0);" class="big_play" onclick="audioPreview('spl_<?php echo $this->partialCounter-1 ?>', '/api/get-media/file/<?php echo $this->CcFiles["gunid"] ?>.mp3/api_key/AAA')"><span class="ui-icon ui-icon-play"></span></a>
<a href="javascript:void(0);" class="big_play" onclick="audioPreview('<?php echo $this->CcFiles["gunid"].".".pathinfo($this->CcFiles["name"], PATHINFO_EXTENSION);?>', 'spl_<?php echo $this->partialCounter-1 ?>')"><span class="ui-icon ui-icon-play"></span></a>
<div class="text-row top">
<span class="spl_playlength"><?php echo $this->cliplength ?></span>
<span class="spl_title"><?php echo $this->CcFiles['track_title'] ?></span>