mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
change browser object
This commit is contained in:
parent
27c3bdc042
commit
7b5f61d2d2
32 changed files with 106 additions and 106 deletions
|
@ -6,7 +6,7 @@
|
||||||
var hasChanges = false;
|
var hasChanges = false;
|
||||||
|
|
||||||
// These images can be large and we're seeing memory problems in safari
|
// These images can be large and we're seeing memory problems in safari
|
||||||
var browsableImagePageSize = $.browser.safari ? 6 : 10;
|
var browsableImagePageSize = browserInfo.safari ? 6 : 10;
|
||||||
|
|
||||||
var browsableImageStartIndex = 0;
|
var browsableImageStartIndex = 0;
|
||||||
var browsableImageType = 'Primary';
|
var browsableImageType = 'Primary';
|
||||||
|
|
|
@ -52,10 +52,10 @@
|
||||||
|
|
||||||
function enableHashChange() {
|
function enableHashChange() {
|
||||||
// It's not firing popstate in response to hashbang changes
|
// It's not firing popstate in response to hashbang changes
|
||||||
if ($.browser.msie) {
|
if (browserInfo.msie) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($.browser.edge) {
|
if (browserInfo.edge) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
// but not needed here since this is already on top of an existing dialog
|
// but not needed here since this is already on top of an existing dialog
|
||||||
// but skip it in IE because it's causing the entire browser to hang
|
// but skip it in IE because it's causing the entire browser to hang
|
||||||
// Also have to disable for firefox because it's causing select elements to not be clickable
|
// Also have to disable for firefox because it's causing select elements to not be clickable
|
||||||
if (!$.browser.msie && !$.browser.mozilla) {
|
if (!browserInfo.msie && !browserInfo.mozilla) {
|
||||||
if (options.modal !== false) {
|
if (options.modal !== false) {
|
||||||
dlg.setAttribute('modal', 'modal');
|
dlg.setAttribute('modal', 'modal');
|
||||||
}
|
}
|
||||||
|
|
|
@ -483,7 +483,7 @@
|
||||||
onProgramGridScroll(tabContent, this);
|
onProgramGridScroll(tabContent, this);
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($.browser.mobile) {
|
if (browserInfo.mobile) {
|
||||||
tabContent.querySelector('.tvGuide').classList.add('mobileGuide');
|
tabContent.querySelector('.tvGuide').classList.add('mobileGuide');
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
2
dashboard-ui/cordova/chromecast.js
vendored
2
dashboard-ui/cordova/chromecast.js
vendored
|
@ -510,7 +510,7 @@
|
||||||
currentSession.on('message', handleMessage);
|
currentSession.on('message', handleMessage);
|
||||||
currentSession.on('disconnect', handleSessionDisconnect);
|
currentSession.on('disconnect', handleSessionDisconnect);
|
||||||
|
|
||||||
if (connectToSession || $.browser.safari) {
|
if (connectToSession || browserInfo.safari) {
|
||||||
currentSession.connect().success(function () {
|
currentSession.connect().success(function () {
|
||||||
|
|
||||||
onWebAppSessionConnect(currentSession, device);
|
onWebAppSessionConnect(currentSession, device);
|
||||||
|
|
6
dashboard-ui/cordova/imagestore.js
vendored
6
dashboard-ui/cordova/imagestore.js
vendored
|
@ -52,7 +52,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizeReturnUrl(url) {
|
function normalizeReturnUrl(url) {
|
||||||
if ($.browser.safari) {
|
if (browserInfo.safari) {
|
||||||
|
|
||||||
// Use the embedded server for iOS8, and also if we don't know the iOS version, just to be safe
|
// Use the embedded server for iOS8, and also if we don't know the iOS version, just to be safe
|
||||||
var index = url.indexOf('/Documents');
|
var index = url.indexOf('/Documents');
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
self.getImageUrl = function (originalUrl) {
|
self.getImageUrl = function (originalUrl) {
|
||||||
|
|
||||||
if ($.browser.android && originalUrl.indexOf('tag=') != -1) {
|
if (browserInfo.android && originalUrl.indexOf('tag=') != -1) {
|
||||||
originalUrl += "&accept=webp";
|
originalUrl += "&accept=webp";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
setImageIntoElement(elem, url);
|
setImageIntoElement(elem, url);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if ($.browser.safari) {
|
//if (browserInfo.safari) {
|
||||||
// setImageWithSdWebImage(elem, url);
|
// setImageWithSdWebImage(elem, url);
|
||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
|
|
2
dashboard-ui/cordova/localassetmanager.js
vendored
2
dashboard-ui/cordova/localassetmanager.js
vendored
|
@ -886,7 +886,7 @@
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
var deferred = DeferredBuilder.Deferred();
|
||||||
|
|
||||||
if ($.browser.android) {
|
if (browserInfo.android) {
|
||||||
deferred.resolveWith(null, ['file://' + path]);
|
deferred.resolveWith(null, ['file://' + path]);
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
}
|
}
|
||||||
|
|
4
dashboard-ui/cordova/registrationservices.js
vendored
4
dashboard-ui/cordova/registrationservices.js
vendored
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
} : null;
|
} : null;
|
||||||
|
|
||||||
var prefix = $.browser.android ? 'android' : 'ios';
|
var prefix = browserInfo.android ? 'android' : 'ios';
|
||||||
|
|
||||||
IapManager.isUnlockedOverride(feature).then(function (isUnlocked) {
|
IapManager.isUnlockedOverride(feature).then(function (isUnlocked) {
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@
|
||||||
Events.on(IapManager, 'productupdated', onProductUpdated);
|
Events.on(IapManager, 'productupdated', onProductUpdated);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.android) {
|
if (browserInfo.android) {
|
||||||
requirejs(['cordova/android/iap'], onIapManagerLoaded);
|
requirejs(['cordova/android/iap'], onIapManagerLoaded);
|
||||||
} else {
|
} else {
|
||||||
requirejs(['cordova/iap'], onIapManagerLoaded);
|
requirejs(['cordova/iap'], onIapManagerLoaded);
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
|
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
|
||||||
var isScrollable = !$.browser.safari;
|
var isScrollable = !browserInfo.safari;
|
||||||
|
|
||||||
if (isScrollable) {
|
if (isScrollable) {
|
||||||
html += '<paper-dialog-scrollable>';
|
html += '<paper-dialog-scrollable>';
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// Seeing an issue in some non-chrome browsers where this is requiring a double click
|
// Seeing an issue in some non-chrome browsers where this is requiring a double click
|
||||||
var eventName = $.browser.chrome || $.browser.safari ? 'click' : 'mousedown';
|
var eventName = browserInfo.chrome || browserInfo.safari ? 'click' : 'mousedown';
|
||||||
|
|
||||||
$('.actionSheetMenuItem', dlg).on(eventName, function () {
|
$('.actionSheetMenuItem', dlg).on(eventName, function () {
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
return val != 'false';
|
return val != 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.mobile) {
|
if (browserInfo.mobile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function ($, document) {
|
(function ($, document) {
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThumbShape() {
|
function getThumbShape() {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThumbShape() {
|
function getThumbShape() {
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
// Appending #t=xxx to the query string doesn't seem to work with HLS
|
// Appending #t=xxx to the query string doesn't seem to work with HLS
|
||||||
if (startPositionInSeekParam && src.indexOf('.m3u8') != -1) {
|
if (startPositionInSeekParam && src.indexOf('.m3u8') != -1) {
|
||||||
|
|
||||||
var delay = $.browser.safari ? 2500 : 0;
|
var delay = browserInfo.safari ? 2500 : 0;
|
||||||
var element = this;
|
var element = this;
|
||||||
if (delay) {
|
if (delay) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
@ -202,10 +202,10 @@
|
||||||
var requiresNativeControls = !self.enableCustomVideoControls();
|
var requiresNativeControls = !self.enableCustomVideoControls();
|
||||||
|
|
||||||
// Safari often displays the poster under the video and it doesn't look good
|
// Safari often displays the poster under the video and it doesn't look good
|
||||||
var poster = !$.browser.safari && options.poster ? (' poster="' + options.poster + '"') : '';
|
var poster = !browserInfo.safari && options.poster ? (' poster="' + options.poster + '"') : '';
|
||||||
|
|
||||||
// Can't autoplay in these browsers so we need to use the full controls
|
// Can't autoplay in these browsers so we need to use the full controls
|
||||||
if (requiresNativeControls && AppInfo.isNativeApp && $.browser.android) {
|
if (requiresNativeControls && AppInfo.isNativeApp && browserInfo.android) {
|
||||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay" crossorigin="anonymous"' + poster + ' webkit-playsinline>';
|
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay" crossorigin="anonymous"' + poster + ' webkit-playsinline>';
|
||||||
}
|
}
|
||||||
else if (requiresNativeControls) {
|
else if (requiresNativeControls) {
|
||||||
|
@ -321,7 +321,7 @@
|
||||||
elem.src = "";
|
elem.src = "";
|
||||||
|
|
||||||
// When the browser regains focus it may start auto-playing the last video
|
// When the browser regains focus it may start auto-playing the last video
|
||||||
if ($.browser.safari) {
|
if (browserInfo.safari) {
|
||||||
elem.src = 'files/dummy.mp4';
|
elem.src = 'files/dummy.mp4';
|
||||||
elem.play();
|
elem.play();
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@
|
||||||
|
|
||||||
var val = streamInfo.url;
|
var val = streamInfo.url;
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||||
val = val.replace('file://', '');
|
val = val.replace('file://', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,7 +558,7 @@
|
||||||
|
|
||||||
self.enableCustomVideoControls = function () {
|
self.enableCustomVideoControls = function () {
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||||
|
|
||||||
if (navigator.userAgent.toLowerCase().indexOf('iphone') != -1) {
|
if (navigator.userAgent.toLowerCase().indexOf('iphone') != -1) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -568,7 +568,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.canAutoPlayVideo() && !$.browser.mobile;
|
return self.canAutoPlayVideo() && !browserInfo.mobile;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.canAutoPlayVideo = function () {
|
self.canAutoPlayVideo = function () {
|
||||||
|
@ -577,7 +577,7 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.mobile) {
|
if (browserInfo.mobile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
function getDefaultSection(index) {
|
function getDefaultSection(index) {
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
|
|
|
@ -644,7 +644,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPortraitShape() {
|
function getPortraitShape() {
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
getDefaultItemsView: function (view, mobileView) {
|
getDefaultItemsView: function (view, mobileView) {
|
||||||
|
|
||||||
return $.browser.mobile ? mobileView : view;
|
return browserInfo.mobile ? mobileView : view;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
|
|
||||||
if (AppInfo.isNativeApp) {
|
if (AppInfo.isNativeApp) {
|
||||||
cacheDuration = 300000;
|
cacheDuration = 300000;
|
||||||
} else if ($.browser.ipad || $.browser.iphone || $.browser.android) {
|
} else if (browserInfo.ipad || browserInfo.iphone || browserInfo.android) {
|
||||||
cacheDuration = 10000;
|
cacheDuration = 10000;
|
||||||
} else {
|
} else {
|
||||||
cacheDuration = 30000;
|
cacheDuration = 30000;
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.safari) {
|
if (browserInfo.safari) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,13 +245,13 @@
|
||||||
configurePaperLibraryTabs: function (ownerpage, tabs, pages) {
|
configurePaperLibraryTabs: function (ownerpage, tabs, pages) {
|
||||||
|
|
||||||
// Causing iron-select to not fire in IE and safari
|
// Causing iron-select to not fire in IE and safari
|
||||||
if ($.browser.chrome) {
|
if (browserInfo.chrome) {
|
||||||
tabs.noink = true;
|
tabs.noink = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LibraryBrowser.enableFullPaperTabs()) {
|
if (LibraryBrowser.enableFullPaperTabs()) {
|
||||||
|
|
||||||
if ($.browser.safari) {
|
if (browserInfo.safari) {
|
||||||
tabs.noSlide = true;
|
tabs.noSlide = true;
|
||||||
tabs.noBar = true;
|
tabs.noBar = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
if (!LibraryBrowser.navigateOnLibraryTabSelect()) {
|
if (!LibraryBrowser.navigateOnLibraryTabSelect()) {
|
||||||
tabs.addEventListener('iron-select', function () {
|
tabs.addEventListener('iron-select', function () {
|
||||||
|
|
||||||
var animateTab = !$.browser.safari;
|
var animateTab = !browserInfo.safari;
|
||||||
animateTab = false;
|
animateTab = false;
|
||||||
|
|
||||||
var selected = pages.selected;
|
var selected = pages.selected;
|
||||||
|
@ -413,7 +413,7 @@
|
||||||
var tabs = this.querySelector('paper-tabs');
|
var tabs = this.querySelector('paper-tabs');
|
||||||
|
|
||||||
// For some reason the live tv page will not switch tabs in IE and safari
|
// For some reason the live tv page will not switch tabs in IE and safari
|
||||||
var delay = $.browser.chrome ? 0 : 100;
|
var delay = browserInfo.chrome ? 0 : 100;
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
var noSlide = tabs.noSlide;
|
var noSlide = tabs.noSlide;
|
||||||
|
@ -1648,7 +1648,7 @@
|
||||||
|
|
||||||
var shapeWidth = screenWidth / imagesPerRow[currentShape];
|
var shapeWidth = screenWidth / imagesPerRow[currentShape];
|
||||||
|
|
||||||
if (!$.browser.mobile) {
|
if (!browserInfo.mobile) {
|
||||||
|
|
||||||
shapeWidth = Math.round(shapeWidth / roundTo) * roundTo;
|
shapeWidth = Math.round(shapeWidth / roundTo) * roundTo;
|
||||||
}
|
}
|
||||||
|
@ -2798,7 +2798,7 @@
|
||||||
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
|
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
|
||||||
// Have to disable this right now because it's causing the radio buttons to not function properly in other browsers besides chrome
|
// Have to disable this right now because it's causing the radio buttons to not function properly in other browsers besides chrome
|
||||||
var isScrollable = false;
|
var isScrollable = false;
|
||||||
if ($.browser.android) {
|
if (browserInfo.android) {
|
||||||
isScrollable = true;
|
isScrollable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -942,7 +942,7 @@
|
||||||
|
|
||||||
$(btnSelectionPanelOptions).on('click', showMenuForSelectedItems);
|
$(btnSelectionPanelOptions).on('click', showMenuForSelectedItems);
|
||||||
|
|
||||||
if (!$.browser.mobile) {
|
if (!browserInfo.mobile) {
|
||||||
shake(btnSelectionPanelOptions, 1);
|
shake(btnSelectionPanelOptions, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
var backIcon = $.browser.safari ? 'chevron-left' : 'arrow-back';
|
var backIcon = browserInfo.safari ? 'chevron-left' : 'arrow-back';
|
||||||
|
|
||||||
html += '<paper-icon-button icon="' + backIcon + '" class="headerButton headerButtonLeft headerBackButton hide"></paper-icon-button>';
|
html += '<paper-icon-button icon="' + backIcon + '" class="headerButton headerButtonLeft headerBackButton hide"></paper-icon-button>';
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
html += '<paper-icon-button icon="person" class="headerButton headerButtonRight headerUserButton" onclick="return Dashboard.showUserFlyout(this);"></paper-icon-button>';
|
html += '<paper-icon-button icon="person" class="headerButton headerButtonRight headerUserButton" onclick="return Dashboard.showUserFlyout(this);"></paper-icon-button>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$.browser.mobile && !Dashboard.isConnectMode()) {
|
if (!browserInfo.mobile && !Dashboard.isConnectMode()) {
|
||||||
html += '<paper-icon-button icon="settings" class="headerButton headerButtonRight dashboardEntryHeaderButton" onclick="return LibraryMenu.onSettingsClicked(event);"></paper-icon-button>';
|
html += '<paper-icon-button icon="settings" class="headerButton headerButtonRight dashboardEntryHeaderButton" onclick="return LibraryMenu.onSettingsClicked(event);"></paper-icon-button>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
}
|
}
|
||||||
function onMainDrawerOpened() {
|
function onMainDrawerOpened() {
|
||||||
|
|
||||||
if ($.browser.mobile) {
|
if (browserInfo.mobile) {
|
||||||
document.body.classList.add('bodyWithPopupOpen');
|
document.body.classList.add('bodyWithPopupOpen');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@
|
||||||
html += '<a class="sidebarLink lnkMediaFolder lnkManageServer" data-itemid="dashboard" href="#"><iron-icon icon="dashboard" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonManageServer') + '</span></a>';
|
html += '<a class="sidebarLink lnkMediaFolder lnkManageServer" data-itemid="dashboard" href="#"><iron-icon icon="dashboard" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonManageServer') + '</span></a>';
|
||||||
html += '<a class="sidebarLink lnkMediaFolder editorViewMenu" data-itemid="editor" onclick="return LibraryMenu.onLinkClicked(event, this);" href="edititemmetadata.html"><iron-icon icon="mode-edit" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonMetadataManager') + '</span></a>';
|
html += '<a class="sidebarLink lnkMediaFolder editorViewMenu" data-itemid="editor" onclick="return LibraryMenu.onLinkClicked(event, this);" href="edititemmetadata.html"><iron-icon icon="mode-edit" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonMetadataManager') + '</span></a>';
|
||||||
|
|
||||||
if (!$.browser.mobile) {
|
if (!browserInfo.mobile) {
|
||||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="reports" onclick="return LibraryMenu.onLinkClicked(event, this);" href="reports.html"><iron-icon icon="insert-chart" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonReports') + '</span></a>';
|
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="reports" onclick="return LibraryMenu.onLinkClicked(event, this);" href="reports.html"><iron-icon icon="insert-chart" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonReports') + '</span></a>';
|
||||||
}
|
}
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -514,7 +514,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function showUserAtTop() {
|
function showUserAtTop() {
|
||||||
return Dashboard.isConnectMode() || $.browser.mobile;
|
return Dashboard.isConnectMode() || browserInfo.mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
var requiresLibraryMenuRefresh = false;
|
var requiresLibraryMenuRefresh = false;
|
||||||
|
@ -548,7 +548,7 @@
|
||||||
closeMainDrawer();
|
closeMainDrawer();
|
||||||
|
|
||||||
// On mobile devices don't navigate until after the closing animation has completed or it may stutter
|
// On mobile devices don't navigate until after the closing animation has completed or it may stutter
|
||||||
var delay = $.browser.mobile ? 350 : 0;
|
var delay = browserInfo.mobile ? 350 : 0;
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (action) {
|
if (action) {
|
||||||
|
@ -573,7 +573,7 @@
|
||||||
closeMainDrawer();
|
closeMainDrawer();
|
||||||
|
|
||||||
// On mobile devices don't navigate until after the closing animation has completed or it may stutter
|
// On mobile devices don't navigate until after the closing animation has completed or it may stutter
|
||||||
var delay = $.browser.mobile ? 350 : 0;
|
var delay = browserInfo.mobile ? 350 : 0;
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
Dashboard.logout();
|
Dashboard.logout();
|
||||||
|
@ -620,7 +620,7 @@
|
||||||
var mainDrawerButton = document.querySelector('.mainDrawerButton');
|
var mainDrawerButton = document.querySelector('.mainDrawerButton');
|
||||||
|
|
||||||
if (mainDrawerButton) {
|
if (mainDrawerButton) {
|
||||||
if (!visible && $.browser.mobile) {
|
if (!visible && browserInfo.mobile) {
|
||||||
mainDrawerButton.classList.remove('hide');
|
mainDrawerButton.classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
mainDrawerButton.classList.remove('hide');
|
mainDrawerButton.classList.remove('hide');
|
||||||
|
@ -837,7 +837,7 @@
|
||||||
var mainDrawerButton = document.querySelector('.mainDrawerButton');
|
var mainDrawerButton = document.querySelector('.mainDrawerButton');
|
||||||
|
|
||||||
if (mainDrawerButton) {
|
if (mainDrawerButton) {
|
||||||
if (page.getAttribute('data-menubutton') == 'false' && $.browser.mobile) {
|
if (page.getAttribute('data-menubutton') == 'false' && browserInfo.mobile) {
|
||||||
mainDrawerButton.classList.remove('hide');
|
mainDrawerButton.classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
mainDrawerButton.classList.remove('hide');
|
mainDrawerButton.classList.remove('hide');
|
||||||
|
@ -868,7 +868,7 @@
|
||||||
document.body.classList.add('hideMainDrawer');
|
document.body.classList.add('hideMainDrawer');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Dashboard.isConnectMode() && !$.browser.mobile) {
|
if (!Dashboard.isConnectMode() && !browserInfo.mobile) {
|
||||||
darkDrawer = true;
|
darkDrawer = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function ($, document) {
|
(function ($, document) {
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPortraitShape() {
|
function getPortraitShape() {
|
||||||
|
|
|
@ -959,7 +959,7 @@
|
||||||
|
|
||||||
// Huge hack alert. Safari doesn't seem to like if the segments aren't available right away when playback starts
|
// Huge hack alert. Safari doesn't seem to like if the segments aren't available right away when playback starts
|
||||||
// This will start the transcoding process before actually feeding the video url into the player
|
// This will start the transcoding process before actually feeding the video url into the player
|
||||||
if ($.browser.safari && !mediaSource.RunTimeTicks) {
|
if (browserInfo.safari && !mediaSource.RunTimeTicks) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
@ -1110,7 +1110,7 @@
|
||||||
|
|
||||||
}).on("click.mediaplayerevent", function (e) {
|
}).on("click.mediaplayerevent", function (e) {
|
||||||
|
|
||||||
if (!$.browser.mobile) {
|
if (!browserInfo.mobile) {
|
||||||
if (this.paused()) {
|
if (this.paused()) {
|
||||||
self.unpause();
|
self.unpause();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1120,7 +1120,7 @@
|
||||||
|
|
||||||
}).on("dblclick.mediaplayerevent", function () {
|
}).on("dblclick.mediaplayerevent", function () {
|
||||||
|
|
||||||
if (!$.browser.mobile) {
|
if (!browserInfo.mobile) {
|
||||||
self.toggleFullscreen();
|
self.toggleFullscreen();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
})[0].maxHeight;
|
})[0].maxHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isVlc = AppInfo.isNativeApp && $.browser.android;
|
var isVlc = AppInfo.isNativeApp && browserInfo.android;
|
||||||
var bitrateSetting = AppSettings.maxStreamingBitrate();
|
var bitrateSetting = AppSettings.maxStreamingBitrate();
|
||||||
|
|
||||||
var supportedFormats = getSupportedFormats();
|
var supportedFormats = getSupportedFormats();
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.chrome) {
|
if (browserInfo.chrome) {
|
||||||
profile.DirectPlayProfiles.push({
|
profile.DirectPlayProfiles.push({
|
||||||
Container: 'mkv,mov',
|
Container: 'mkv,mov',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
Protocol: 'hls'
|
Protocol: 'hls'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (canPlayAac && $.browser.safari && !AppInfo.isNativeApp) {
|
if (canPlayAac && browserInfo.safari && !AppInfo.isNativeApp) {
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: 'ts',
|
Container: 'ts',
|
||||||
Type: 'Audio',
|
Type: 'Audio',
|
||||||
|
@ -252,7 +252,7 @@
|
||||||
Protocol: 'http'
|
Protocol: 'http'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (canPlayAac && $.browser.safari) {
|
if (canPlayAac && browserInfo.safari) {
|
||||||
|
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: 'aac',
|
Container: 'aac',
|
||||||
|
@ -542,7 +542,7 @@
|
||||||
|
|
||||||
var intervalTime = ApiClient.isWebSocketOpen() ? 1200 : 5000;
|
var intervalTime = ApiClient.isWebSocketOpen() ? 1200 : 5000;
|
||||||
// Ease up with safari because it doesn't perform as well
|
// Ease up with safari because it doesn't perform as well
|
||||||
if ($.browser.safari) {
|
if (browserInfo.safari) {
|
||||||
intervalTime = Math.max(intervalTime, 5000);
|
intervalTime = Math.max(intervalTime, 5000);
|
||||||
}
|
}
|
||||||
self.lastProgressReport = 0;
|
self.lastProgressReport = 0;
|
||||||
|
@ -1881,7 +1881,7 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.mobile) {
|
if (browserInfo.mobile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPortraitShape() {
|
function getPortraitShape() {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSquareShape() {
|
function getSquareShape() {
|
||||||
|
|
|
@ -31,14 +31,14 @@ pageIdOn('pageshow', 'myPreferencesMenuPage', function () {
|
||||||
|
|
||||||
page.querySelector('.headerUser').innerHTML = user.Name;
|
page.querySelector('.headerUser').innerHTML = user.Name;
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari && user.Policy.IsAdministrator) {
|
if (AppInfo.isNativeApp && browserInfo.safari && user.Policy.IsAdministrator) {
|
||||||
page.querySelector('.adminSection').classList.remove('hide');
|
page.querySelector('.adminSection').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('.adminSection').classList.add('hide');
|
page.querySelector('.adminSection').classList.add('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||||
page.querySelector('.userSection').classList.remove('hide');
|
page.querySelector('.userSection').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('.userSection').classList.add('hide');
|
page.querySelector('.userSection').classList.add('hide');
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
|
|
||||||
elem = $(getNowPlayingBarHtml()).appendTo(document.body)[0];
|
elem = $(getNowPlayingBarHtml()).appendTo(document.body)[0];
|
||||||
|
|
||||||
if (($.browser.safari || !AppInfo.isNativeApp) && $.browser.mobile) {
|
if ((browserInfo.safari || !AppInfo.isNativeApp) && browserInfo.mobile) {
|
||||||
// Not handled well here. The wrong elements receive events, bar doesn't update quickly enough, etc.
|
// Not handled well here. The wrong elements receive events, bar doesn't update quickly enough, etc.
|
||||||
elem.classList.add('noMediaProgress');
|
elem.classList.add('noMediaProgress');
|
||||||
}
|
}
|
||||||
|
|
|
@ -605,7 +605,7 @@
|
||||||
|
|
||||||
// This should be outside of the IF
|
// This should be outside of the IF
|
||||||
// But for now, if you change songs but keep the same artist, the backdrop will flicker because in-between songs it clears out the image
|
// But for now, if you change songs but keep the same artist, the backdrop will flicker because in-between songs it clears out the image
|
||||||
if (!$.browser.safari) {
|
if (!browserInfo.safari) {
|
||||||
// Exclude from safari because it just doesn't perform well
|
// Exclude from safari because it just doesn't perform well
|
||||||
Backdrops.setBackdropUrl(page, backdropUrl);
|
Backdrops.setBackdropUrl(page, backdropUrl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
var view = items[i];
|
var view = items[i];
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari && view.CollectionType == 'livetv') {
|
if (AppInfo.isNativeApp && browserInfo.safari && view.CollectionType == 'livetv') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
|
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThumbShape() {
|
function getThumbShape() {
|
||||||
|
@ -374,7 +374,7 @@
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
var scrollX = enableScrollX() && $.browser.safari && screenWidth > 800;
|
var scrollX = enableScrollX() && browserInfo.safari && screenWidth > 800;
|
||||||
|
|
||||||
if (scrollX) {
|
if (scrollX) {
|
||||||
html += '<div class="hiddenScrollX itemsContainer homeTopViews">';
|
html += '<div class="hiddenScrollX itemsContainer homeTopViews">';
|
||||||
|
|
|
@ -1505,7 +1505,7 @@ var Dashboard = {
|
||||||
SupportedLiveMediaTypes: ['Audio', 'Video']
|
SupportedLiveMediaTypes: ['Audio', 'Video']
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && !$.browser.safari) {
|
if (Dashboard.isRunningInCordova() && !browserInfo.safari) {
|
||||||
caps.SupportsOfflineAccess = true;
|
caps.SupportsOfflineAccess = true;
|
||||||
caps.SupportsSync = true;
|
caps.SupportsSync = true;
|
||||||
caps.SupportsContentUploading = true;
|
caps.SupportsContentUploading = true;
|
||||||
|
@ -1558,27 +1558,27 @@ var Dashboard = {
|
||||||
|
|
||||||
var name;
|
var name;
|
||||||
|
|
||||||
if ($.browser.chrome) {
|
if (browserInfo.chrome) {
|
||||||
name = "Chrome";
|
name = "Chrome";
|
||||||
} else if ($.browser.edge) {
|
} else if (browserInfo.edge) {
|
||||||
name = "Edge";
|
name = "Edge";
|
||||||
} else if ($.browser.mozilla) {
|
} else if (browserInfo.mozilla) {
|
||||||
name = "Firefox";
|
name = "Firefox";
|
||||||
} else if ($.browser.msie) {
|
} else if (browserInfo.msie) {
|
||||||
name = "Internet Explorer";
|
name = "Internet Explorer";
|
||||||
} else {
|
} else {
|
||||||
name = "Web Browser";
|
name = "Web Browser";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.version) {
|
if (browserInfo.version) {
|
||||||
name += " " + $.browser.version;
|
name += " " + browserInfo.version;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.ipad) {
|
if (browserInfo.ipad) {
|
||||||
name += " Ipad";
|
name += " Ipad";
|
||||||
} else if ($.browser.iphone) {
|
} else if (browserInfo.iphone) {
|
||||||
name += " Iphone";
|
name += " Iphone";
|
||||||
} else if ($.browser.android) {
|
} else if (browserInfo.android) {
|
||||||
name += " Android";
|
name += " Android";
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
|
@ -1680,9 +1680,9 @@ var AppInfo = {};
|
||||||
|
|
||||||
AppInfo.enableAppStorePolicy = isCordova;
|
AppInfo.enableAppStorePolicy = isCordova;
|
||||||
|
|
||||||
var isIOS = $.browser.ipad || $.browser.iphone;
|
var isIOS = browserInfo.ipad || browserInfo.iphone;
|
||||||
var isAndroid = $.browser.android;
|
var isAndroid = browserInfo.android;
|
||||||
var isMobile = $.browser.mobile;
|
var isMobile = browserInfo.mobile;
|
||||||
|
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
|
|
||||||
|
@ -1949,7 +1949,7 @@ var AppInfo = {};
|
||||||
return jQuery;
|
return jQuery;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||||
define("appstorage", ["cordova/android/appstorage"]);
|
define("appstorage", ["cordova/android/appstorage"]);
|
||||||
} else {
|
} else {
|
||||||
define('appstorage', [], function () {
|
define('appstorage', [], function () {
|
||||||
|
@ -1970,15 +1970,15 @@ var AppInfo = {};
|
||||||
define("localassetmanager", ["apiclient/localassetmanager"]);
|
define("localassetmanager", ["apiclient/localassetmanager"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||||
define("nativedirectorychooser", ["cordova/android/nativedirectorychooser"]);
|
define("nativedirectorychooser", ["cordova/android/nativedirectorychooser"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||||
define("audiorenderer", ["cordova/android/vlcplayer"]);
|
define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||||
define("videorenderer", ["cordova/android/vlcplayer"]);
|
define("videorenderer", ["cordova/android/vlcplayer"]);
|
||||||
}
|
}
|
||||||
else if (Dashboard.isRunningInCordova() && $.browser.safari) {
|
else if (Dashboard.isRunningInCordova() && browserInfo.safari) {
|
||||||
define("audiorenderer", ["cordova/ios/vlcplayer"]);
|
define("audiorenderer", ["cordova/ios/vlcplayer"]);
|
||||||
define("videorenderer", ["scripts/htmlmediarenderer"]);
|
define("videorenderer", ["scripts/htmlmediarenderer"]);
|
||||||
}
|
}
|
||||||
|
@ -1987,7 +1987,7 @@ var AppInfo = {};
|
||||||
define("videorenderer", ["scripts/htmlmediarenderer"]);
|
define("videorenderer", ["scripts/htmlmediarenderer"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||||
define("localsync", ["cordova/android/localsync"]);
|
define("localsync", ["cordova/android/localsync"]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2029,7 +2029,7 @@ var AppInfo = {};
|
||||||
define("sharingwidget", ["scripts/sharingwidget"]);
|
define("sharingwidget", ["scripts/sharingwidget"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && $.browser.safari) {
|
if (Dashboard.isRunningInCordova() && browserInfo.safari) {
|
||||||
define("searchmenu", ["cordova/searchmenu"]);
|
define("searchmenu", ["cordova/searchmenu"]);
|
||||||
} else {
|
} else {
|
||||||
define("searchmenu", ["scripts/searchmenu"]);
|
define("searchmenu", ["scripts/searchmenu"]);
|
||||||
|
@ -2131,13 +2131,13 @@ var AppInfo = {};
|
||||||
|
|
||||||
drawer.drawerWidth = drawerWidth + "px";
|
drawer.drawerWidth = drawerWidth + "px";
|
||||||
|
|
||||||
if ($.browser.safari) {
|
if (browserInfo.safari) {
|
||||||
drawer.disableEdgeSwipe = true;
|
drawer.disableEdgeSwipe = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var deps = [];
|
var deps = [];
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.android) {
|
if (AppInfo.isNativeApp && browserInfo.android) {
|
||||||
require(['cordova/android/logging']);
|
require(['cordova/android/logging']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2153,7 +2153,7 @@ var AppInfo = {};
|
||||||
|
|
||||||
require(deps, function () {
|
require(deps, function () {
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||||
AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
||||||
|
|
||||||
// TODO: This is going to exclude it from both playback and sync, so improve on this
|
// TODO: This is going to exclude it from both playback and sync, so improve on this
|
||||||
|
@ -2163,7 +2163,7 @@ var AppInfo = {};
|
||||||
|
|
||||||
AppInfo.directPlayVideoContainers = "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm".split(',');
|
AppInfo.directPlayVideoContainers = "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm".split(',');
|
||||||
}
|
}
|
||||||
else if (Dashboard.isRunningInCordova() && $.browser.safari) {
|
else if (Dashboard.isRunningInCordova() && browserInfo.safari) {
|
||||||
|
|
||||||
AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
||||||
|
|
||||||
|
@ -2226,47 +2226,47 @@ var AppInfo = {};
|
||||||
|
|
||||||
function onAppReady(promiseResolve) {
|
function onAppReady(promiseResolve) {
|
||||||
|
|
||||||
if ($.browser.msie) {
|
if (browserInfo.msie) {
|
||||||
require(['devices/ie/ie']);
|
require(['devices/ie/ie']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do these now to prevent a flash of content
|
// Do these now to prevent a flash of content
|
||||||
if (AppInfo.isNativeApp && $.browser.android) {
|
if (AppInfo.isNativeApp && browserInfo.android) {
|
||||||
Dashboard.importCss('devices/android/android.css');
|
Dashboard.importCss('devices/android/android.css');
|
||||||
} else if (AppInfo.isNativeApp && $.browser.safari) {
|
} else if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||||
Dashboard.importCss('devices/ios/ios.css');
|
Dashboard.importCss('devices/ios/ios.css');
|
||||||
} else if (!$.browser.android) {
|
} else if (!browserInfo.android) {
|
||||||
Dashboard.importCss('devices/android/android.css');
|
Dashboard.importCss('devices/android/android.css');
|
||||||
}
|
}
|
||||||
|
|
||||||
loadTheme();
|
loadTheme();
|
||||||
|
|
||||||
if ($.browser.safari && $.browser.mobile) {
|
if (browserInfo.safari && browserInfo.mobile) {
|
||||||
initFastClick();
|
initFastClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova()) {
|
if (Dashboard.isRunningInCordova()) {
|
||||||
require(['cordova/connectsdk', 'scripts/registrationservices', 'cordova/back']);
|
require(['cordova/connectsdk', 'scripts/registrationservices', 'cordova/back']);
|
||||||
|
|
||||||
if ($.browser.android) {
|
if (browserInfo.android) {
|
||||||
require(['cordova/android/androidcredentials', 'cordova/android/immersive', 'cordova/android/mediasession']);
|
require(['cordova/android/androidcredentials', 'cordova/android/immersive', 'cordova/android/mediasession']);
|
||||||
} else {
|
} else {
|
||||||
require(['cordova/volume']);
|
require(['cordova/volume']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.safari) {
|
if (browserInfo.safari) {
|
||||||
require(['cordova/ios/orientation']);
|
require(['cordova/ios/orientation']);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ($.browser.chrome) {
|
if (browserInfo.chrome) {
|
||||||
require(['scripts/chromecast']);
|
require(['scripts/chromecast']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var deps = [];
|
var deps = [];
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||||
|
|
||||||
if (Dashboard.capabilities().SupportsSync) {
|
if (Dashboard.capabilities().SupportsSync) {
|
||||||
deps.push('cordova/ios/backgroundfetch');
|
deps.push('cordova/ios/backgroundfetch');
|
||||||
|
@ -2317,7 +2317,7 @@ var AppInfo = {};
|
||||||
cordova.getAppVersion.getVersionNumber(function (appVersion) {
|
cordova.getAppVersion.getVersionNumber(function (appVersion) {
|
||||||
var capablities = Dashboard.capabilities();
|
var capablities = Dashboard.capabilities();
|
||||||
|
|
||||||
var name = $.browser.android ? "Emby for Android Mobile" : ($.browser.safari ? "Emby for iOS" : "Emby Mobile");
|
var name = browserInfo.android ? "Emby for Android Mobile" : (browserInfo.safari ? "Emby for iOS" : "Emby Mobile");
|
||||||
|
|
||||||
// Remove special characters
|
// Remove special characters
|
||||||
var cleanDeviceName = device.model.replace(/[^\w\s]/gi, '');
|
var cleanDeviceName = device.model.replace(/[^\w\s]/gi, '');
|
||||||
|
@ -2399,7 +2399,7 @@ var AppInfo = {};
|
||||||
browser.mobile = true;
|
browser.mobile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery.browser = browser;
|
window.browserInfo = browser;
|
||||||
}
|
}
|
||||||
|
|
||||||
initRequire();
|
initRequire();
|
||||||
|
@ -2519,7 +2519,7 @@ pageClassOn('pageshow', "page", function () {
|
||||||
page.classList.remove('ui-body-a');
|
page.classList.remove('ui-body-a');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentTheme != 'a' && !$.browser.mobile) {
|
if (currentTheme != 'a' && !browserInfo.mobile) {
|
||||||
document.body.classList.add('darkScrollbars');
|
document.body.classList.add('darkScrollbars');
|
||||||
} else {
|
} else {
|
||||||
document.body.classList.remove('darkScrollbars');
|
document.body.classList.remove('darkScrollbars');
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThumbShape() {
|
function getThumbShape() {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThumbShape() {
|
function getThumbShape() {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
Dashboard.importCss('themes/halloween/style.css');
|
Dashboard.importCss('themes/halloween/style.css');
|
||||||
|
|
||||||
if (!$.browser.mobile) {
|
if (!browserInfo.mobile) {
|
||||||
|
|
||||||
if (!page.classList.contains('itemDetailPage')) {
|
if (!page.classList.contains('itemDetailPage')) {
|
||||||
Backdrops.setBackdropUrl(page, 'themes/halloween/bg.jpg');
|
Backdrops.setBackdropUrl(page, 'themes/halloween/bg.jpg');
|
||||||
|
|
|
@ -204,7 +204,7 @@
|
||||||
elem.setAttribute("src", url);
|
elem.setAttribute("src", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.chrome && !$.browser.mobile) {
|
if (browserInfo.chrome && !browserInfo.mobile) {
|
||||||
if (!elem.classList.contains('noFade')) {
|
if (!elem.classList.contains('noFade')) {
|
||||||
fadeIn(elem, 1);
|
fadeIn(elem, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2081,7 +2081,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO deprecate prevPage in favor of previous
|
// TODO deprecate prevPage in favor of previous
|
||||||
if (!prefix && $.browser.msie) {
|
if (!prefix && browserInfo.msie) {
|
||||||
|
|
||||||
// Add a delay for IE because it seems to be having issues with web components
|
// Add a delay for IE because it seems to be having issues with web components
|
||||||
var curr = this;
|
var curr = this;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue