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:
parent
98bf4945e4
commit
683d8d69a9
2 changed files with 338 additions and 333 deletions
|
@ -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);
|
|
@ -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);
|
Loading…
Add table
Add a link
Reference in a new issue