1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixed js closures

This commit is contained in:
Luke Pulverenti 2013-04-10 17:03:28 -04:00
parent 98bf4945e4
commit 683d8d69a9
2 changed files with 338 additions and 333 deletions

View file

@ -1,5 +1,6 @@
var MediaPlayer = (function (document, clearTimeout, screen, localStorage, _V_, $, setInterval) { (function (document, clearTimeout, screen, localStorage, _V_, $, setInterval) {
function mediaPlayer() {
var self = this; var self = this;
var testableAudioElement = document.createElement('audio'); var testableAudioElement = document.createElement('audio');
@ -356,7 +357,8 @@
self.isPlaying = function () { self.isPlaying = function () {
return currentMediaElement; return currentMediaElement;
}; };
}
return self; window.MediaPlayer = new mediaPlayer();
})(document, clearTimeout, screen, localStorage, _V_, $, setInterval); })(document, clearTimeout, screen, localStorage, _V_, $, setInterval);

View file

@ -1,10 +1,11 @@
var Playlist = (function() { (function (window) {
function playlist() {
var self = this; var self = this;
self.queue = []; self.queue = [];
self.add = function(item) { self.add = function (item) {
queue.push(item); queue.push(item);
}; };
@ -21,5 +22,7 @@
}; };
return self; return self;
}
})(); window.Playlist = new playlist();
})(window);