summaryrefslogtreecommitdiffstats
path: root/apps/media/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-08-05 16:05:10 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-08-06 10:08:26 +0200
commitc998bc1215cce9508d2cf42b49fefab0a573baaf (patch)
treedea18b2dcf452c2c42ef87e4607ce1a579eb41c3 /apps/media/js
parentfaf6c0e8e10347e16799699eab401060e28d7531 (diff)
downloadnextcloud-server-c998bc1215cce9508d2cf42b49fefab0a573baaf.tar.gz
nextcloud-server-c998bc1215cce9508d2cf42b49fefab0a573baaf.zip
fix some issues with browsers not supporting html5 localStorage
Diffstat (limited to 'apps/media/js')
-rw-r--r--apps/media/js/loader.js2
-rw-r--r--apps/media/js/player.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/media/js/loader.js b/apps/media/js/loader.js
index c49d90cf3eb..b7ef2fb7be4 100644
--- a/apps/media/js/loader.js
+++ b/apps/media/js/loader.js
@@ -50,7 +50,7 @@ $(document).ready(function() {
FileActions.setDefault('application/ogg','Play');
}
if(typeof PlayList==='undefined'){
- if(typeof localStorage !== 'undefined'){
+ if(typeof localStorage !== 'undefined' && localStorage){
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items') && localStorage.getItem(oc_current_user+'oc_playlist_items')!='[]' && localStorage.getItem(oc_current_user+'oc_playlist_active')!='true'){
loadPlayer();
}
diff --git a/apps/media/js/player.js b/apps/media/js/player.js
index ec22b0eaf97..4e1cc3cd754 100644
--- a/apps/media/js/player.js
+++ b/apps/media/js/player.js
@@ -143,7 +143,7 @@ var PlayList={
}
},
save:function(){
- if(typeof localStorage !== 'undefined'){
+ if(typeof localStorage !== 'undefined' && localStorage){
localStorage.setItem(oc_current_user+'oc_playlist_items',JSON.stringify(PlayList.items));
localStorage.setItem(oc_current_user+'oc_playlist_current',PlayList.current);
var time=Math.round(PlayList.player.data('jPlayer').status.currentTime);
@@ -156,7 +156,7 @@ var PlayList={
}
},
load:function(){
- if(typeof localStorage !== 'undefined'){
+ if(typeof localStorage !== 'undefined' && localStorage){
PlayList.active=true;
localStorage.setItem(oc_current_user+'oc_playlist_active','true');
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items')){