mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
basic minification for apphost web component dependency section
This commit is contained in:
parent
f40d74725f
commit
68926062b0
1 changed files with 34 additions and 7 deletions
|
@ -117,13 +117,40 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function(appSett
|
||||||
var htmlMediaAutoplayAppStorageKey = "supportshtmlmediaautoplay0",
|
var htmlMediaAutoplayAppStorageKey = "supportshtmlmediaautoplay0",
|
||||||
supportedFeatures = function() {
|
supportedFeatures = function() {
|
||||||
var features = [];
|
var features = [];
|
||||||
return navigator.share && features.push("sharing"), browser.edgeUwp || browser.tv || browser.xboxOne || browser.ps4 || features.push("filedownload"), browser.operaTv || browser.tizen || browser.orsay || browser.web0s ? features.push("exit") : (features.push("exitmenu"), features.push("plugins")), browser.operaTv || browser.tizen || browser.orsay || browser.web0s || browser.ps4 || (features.push("externallinks"), features.push("externalpremium")), browser.operaTv || features.push("externallinkdisplay"), supportsVoiceInput() && features.push("voiceinput"), !browser.tv && !browser.xboxOne && browser.ps4, supportsHtmlMediaAutoplay() && (features.push("htmlaudioautoplay"), features.push("htmlvideoautoplay")), browser.edgeUwp && features.push("sync"), supportsFullscreen() && features.push("fullscreenchange"), (browser.chrome || browser.edge && !browser.slow) && (browser.noAnimation || browser.edgeUwp || browser.xboxOne || features.push("imageanalysis")), AppInfo.isNativeApp && features.push("multiserver"), (browser.tv || browser.xboxOne || browser.ps4 || browser.mobile) && features.push("physicalvolumecontrol"), browser.tv || browser.xboxOne || browser.ps4 || features.push("remotecontrol"), browser.operaTv || browser.tizen || browser.orsay || browser.web0s || browser.edgeUwp || features.push("remotevideo"), features.push("otherapppromotions"), features.push("targetblank"), browser.orsay || browser.tizen || browser.msie || !(browser.firefox || browser.ps4 || browser.edge || cueSupported()) || features.push("subtitleappearancesettings"), browser.orsay || browser.tizen || features.push("subtitleburnsettings"), browser.tv || browser.ps4 || browser.xboxOne || features.push("fileinput"), AppInfo.isNativeApp && features.push("displaylanguage"), browser.chrome && features.push("chromecast"), features
|
return navigator.share && features.push("sharing");
|
||||||
}(); - 1 === supportedFeatures.indexOf("htmlvideoautoplay") && !1 !== supportsHtmlMediaAutoplay() && require(["autoPlayDetect"], function(autoPlayDetect) {
|
browser.edgeUwp || browser.tv || browser.xboxOne || browser.ps4 || features.push("filedownload");
|
||||||
|
browser.operaTv || browser.tizen || browser.orsay || browser.web0s
|
||||||
|
? features.push("exit")
|
||||||
|
: (features.push("exitmenu"), features.push("plugins"));
|
||||||
|
browser.operaTv || browser.tizen || browser.orsay || browser.web0s || browser.ps4 || (features.push("externallinks"), features.push("externalpremium"));
|
||||||
|
browser.operaTv || features.push("externallinkdisplay");
|
||||||
|
supportsVoiceInput() && features.push("voiceinput");
|
||||||
|
!browser.tv && !browser.xboxOne && browser.ps4, supportsHtmlMediaAutoplay() && (features.push("htmlaudioautoplay"), features.push("htmlvideoautoplay"));
|
||||||
|
browser.edgeUwp && features.push("sync");
|
||||||
|
supportsFullscreen() && features.push("fullscreenchange");
|
||||||
|
(browser.chrome || browser.edge && !browser.slow) && (browser.noAnimation || browser.edgeUwp || browser.xboxOne || features.push("imageanalysis"));
|
||||||
|
AppInfo.isNativeApp && features.push("multiserver");
|
||||||
|
(browser.tv || browser.xboxOne || browser.ps4 || browser.mobile) && features.push("physicalvolumecontrol");
|
||||||
|
browser.tv || browser.xboxOne || browser.ps4 || features.push("remotecontrol");
|
||||||
|
browser.operaTv || browser.tizen || browser.orsay || browser.web0s || browser.edgeUwp || features.push("remotevideo");
|
||||||
|
features.push("otherapppromotions");
|
||||||
|
features.push("targetblank");
|
||||||
|
browser.orsay || browser.tizen || browser.msie || !(browser.firefox || browser.ps4 || browser.edge || cueSupported()) || features.push("subtitleappearancesettings");
|
||||||
|
browser.orsay || browser.tizen || features.push("subtitleburnsettings");
|
||||||
|
browser.tv || browser.ps4 || browser.xboxOne || features.push("fileinput");
|
||||||
|
AppInfo.isNativeApp && features.push("displaylanguage");
|
||||||
|
browser.chrome && features.push("chromecast");
|
||||||
|
}();
|
||||||
|
if (supportedFeatures.indexOf("htmlvideoautoplay") === -1 && supportsHtmlMediaAutoplay() !=== false) {
|
||||||
|
require(["autoPlayDetect"], function(autoPlayDetect) {
|
||||||
autoPlayDetect.supportsHtmlMediaAutoplay().then(function() {
|
autoPlayDetect.supportsHtmlMediaAutoplay().then(function() {
|
||||||
appSettings.set(htmlMediaAutoplayAppStorageKey, "true"), supportedFeatures.push("htmlvideoautoplay"), supportedFeatures.push("htmlaudioautoplay")
|
appSettings.set(htmlMediaAutoplayAppStorageKey, "true");
|
||||||
|
supportedFeatures.push("htmlvideoautoplay");
|
||||||
|
supportedFeatures.push("htmlaudioautoplay");
|
||||||
}, function() {
|
}, function() {
|
||||||
appSettings.set(htmlMediaAutoplayAppStorageKey, "false")
|
appSettings.set(htmlMediaAutoplayAppStorageKey, "false");
|
||||||
})
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
var deviceId, deviceName, visibilityChange, visibilityState, appVersion = window.dashboardVersion || "3.0",
|
var deviceId, deviceName, visibilityChange, visibilityState, appVersion = window.dashboardVersion || "3.0",
|
||||||
appHost = {
|
appHost = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue