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

adjust startup sequences

This commit is contained in:
Luke Pulverenti 2015-05-02 12:34:27 -04:00
parent 0a225d099d
commit e2ebee7c31
7 changed files with 193 additions and 142 deletions

View file

@ -910,6 +910,10 @@
self.canAutoPlayVideo = function () {
if (Dashboard.isRunningInCordova()) {
return true;
}
if ($.browser.msie || $.browser.mobile) {
return false;
}
@ -917,6 +921,11 @@
return true;
};
self.enableCustomVideoControls = function () {
return self.canAutoPlayVideo() && !$.browser.mobile;
};
// Replace audio version
self.cleanup = function (playerElement) {
@ -996,7 +1005,7 @@
// Create video player
var html = '';
var requiresNativeControls = !self.canAutoPlayVideo();
var requiresNativeControls = !self.enableCustomVideoControls();
// Can't autoplay in these browsers so we need to use the full controls
if (requiresNativeControls) {
@ -1202,7 +1211,7 @@
self.updatePlaylistUi = function () {
var index = self.currentPlaylistIndex(null),
length = self.playlist.length,
requiresNativeControls = !self.canAutoPlayVideo(),
requiresNativeControls = !self.enableCustomVideoControls(),
controls = $(requiresNativeControls ? '.videoAdvancedControls' : '.videoControls');
if (length < 2) {