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

update views

This commit is contained in:
Luke Pulverenti 2015-11-18 00:49:20 -05:00
parent 7f0e5e8cd8
commit 8c9287d505
15 changed files with 168 additions and 103 deletions

View file

@ -256,10 +256,6 @@
$(self).trigger('beforeplaybackstart', [state, this]);
}
function onPlaybackStart(e, state) {
$(self).trigger('playbackstart', [state, this]);
}
function onPlaybackStop(e, state) {
$(self).trigger('playbackstop', [state, this]);
}
@ -462,10 +458,39 @@
}
requirejs(["scripts/registrationservices"], function () {
RegistrationServices.validateFeature('playback').done(fn);
self.playbackTimeLimitMs = null;
RegistrationServices.validateFeature('playback').done(fn).fail(function () {
self.playbackTimeLimitMs = lockedTimeLimitMs;
startAutoStopTimer();
fn();
});
});
}
var autoStopTimeout;
var lockedTimeLimitMs = 120000;
function startAutoStopTimer() {
stopAutoStopTimer();
autoStopTimeout = setTimeout(onAutoStopTimeout, lockedTimeLimitMs);
}
function onAutoStopTimeout() {
stopAutoStopTimer();
MediaController.stop();
}
function stopAutoStopTimer() {
var timeout = autoStopTimeout;
if (timeout) {
clearTimeout(timeout);
autoStopTimeout = null;
}
}
self.toggleDisplayMirroring = function () {
self.enableDisplayMirroring(!self.enableDisplayMirroring());
};