CC-2430: Preview tracks in the library + better preview (ability to jump around in clip)
- Merged with devel, removed js from StoredFile.php
This commit is contained in:
parent
51f004933b
commit
a246f85a5b
|
@ -68,7 +68,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
public function contextMenuAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
global $CC_CONFIG;
|
||||
|
||||
$id = $this->_getParam('id');
|
||||
$type = $this->_getParam('type');
|
||||
|
@ -88,15 +88,17 @@ class LibraryController extends Zend_Controller_Action
|
|||
if (isset($this->pl_sess->id) && $screen == "playlist") {
|
||||
$menu["pl_add"] = array("name"=> "Add to Playlist", "icon" => "copy");
|
||||
}
|
||||
|
||||
//Open a jPlayer window and play the audio clip.
|
||||
$menu["play"] = array("name"=> "Play", "icon" => "big_play");
|
||||
|
||||
$menu["edit"] = array("name"=> "Edit Metadata", "icon" => "edit", "url" => "/library/edit-file-md/id/{$id}");
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/library/delete");
|
||||
}
|
||||
|
||||
$url = $file->getRelativeFileUrl($baseUrl).'/download/true';
|
||||
$menu["download"] = array("name" => "Download", "url" => $url);
|
||||
$url = $file->getRelativeFileUrl($baseUrl).'/download/true';
|
||||
$menu["download"] = array("name" => "Download", "url" => $url);
|
||||
|
||||
if (Application_Model_Preference::GetUploadToSoundcloudOption()) {
|
||||
|
||||
|
|
|
@ -660,10 +660,8 @@ Logging::log("getting media! - 2");
|
|||
//access to zend view methods to access url helpers is needed.
|
||||
|
||||
if($type == "au" && isset( $audioResults )) {
|
||||
$audioFile = $audioResults[$row['id']-1]['gunid'].".".pathinfo($audioResults[$row['id']-1]['filepath'], PATHINFO_EXTENSION);
|
||||
$row['image'] = '<a href="javascript:void(0);" class="big_play"
|
||||
onclick="open_audio_preview(\''.$audioFile.'\', \'spl_'.$row['id'].'\');">
|
||||
<span class="ui-icon ui-icon-play"></span></a>';
|
||||
$row['audioFile'] = $audioResults[$row['id']-1]['gunid'].".".pathinfo($audioResults[$row['id']-1]['filepath'], PATHINFO_EXTENSION);
|
||||
$row['image'] = '<span class="ui-icon ui-icon-play"></span>';
|
||||
|
||||
}
|
||||
else {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
var audio_preview_window = null;
|
||||
var audio_preview_window_p = null;
|
||||
|
||||
function playlistAudioPreviewEditor(filename, elemIndexString){
|
||||
|
||||
|
@ -41,7 +41,7 @@ function playlistAudioPreviewEditor(filename, elemIndexString){
|
|||
|
||||
}
|
||||
|
||||
function open_audio_preview(filename, index) {
|
||||
function open_audio_preview_old(filename, index) {
|
||||
console.log("hello world 2 "+filename+" help?");
|
||||
url = 'Playlist/audio-preview-player/filename/'+filename+'/index/'+index;
|
||||
//$.post(baseUri+'Playlist/audio-preview-player', {fileName: fileName, cueIn: cueIn, cueOut: cueOut, fadeIn: fadeIn, fadeInFileName: fadeInFileName, fadeOut: fadeOut, fadeOutFileName: fadeOutFileName})
|
||||
|
@ -57,6 +57,13 @@ function open_audio_preview(filename, index) {
|
|||
console.log("something else : "+baseUrl+url);
|
||||
}
|
||||
|
||||
audio_preview_window.focus();
|
||||
//Set the play button to pause.
|
||||
var elemID = "spl_"+elemIndexString;
|
||||
$('#'+elemID+' div.list-item-container a span').attr("class", "ui-icon ui-icon-pause");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#library_type').bind('click', function(){
|
||||
console.log(data);
|
||||
});
|
|
@ -67,6 +67,6 @@ function play(filename){
|
|||
cssSelectorAncestor: '#jp_container_1',
|
||||
wmode: "window"
|
||||
});
|
||||
$this.focus();
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue