make the persitent playlist work anywhere

This commit is contained in:
Robin Appelman 2011-08-01 01:20:00 +02:00
parent e1596cc65a
commit 1933426e3e
2 changed files with 7 additions and 7 deletions

View File

@ -22,9 +22,7 @@
require_once('apps/media/lib_media.php');
if(OC_App::getCurrentApp()=='files'){
OC_Util::addScript('media','files');
}
OC_Util::addScript('media','loader');
OC_App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' ));

View File

@ -43,10 +43,12 @@ $(document).ready(function() {
// FileActions.register('audio','Add to playlist','',addAudio);
// FileActions.register('application/ogg','Add to playlist','',addAudio);
FileActions.register('audio','Play','',playAudio);
FileActions.register('application/ogg','','Play',playAudio);
FileActions.setDefault('audio','Play');
FileActions.setDefault('application/ogg','Play');
if(typeof FileActions!=='undefined'){
FileActions.register('audio','Play','',playAudio);
FileActions.register('application/ogg','','Play',playAudio);
FileActions.setDefault('audio','Play');
FileActions.setDefault('application/ogg','Play');
}
if(typeof localStorage !== 'undefined'){
if(localStorage.hasOwnProperty('oc_playlist_items')){
loadPlayer();