mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add basic web client configuration
This commit is contained in:
parent
be23d14f48
commit
ea9e79f4d3
5 changed files with 47 additions and 579 deletions
|
@ -1,4 +1,4 @@
|
|||
define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSettings, browser, events, htmlMediaHelper) {
|
||||
define(["appSettings", "browser", "events", "htmlMediaHelper", "webSettings"], function (appSettings, browser, events, htmlMediaHelper, webSettings) {
|
||||
"use strict";
|
||||
|
||||
function getBaseProfileOptions(item) {
|
||||
|
@ -276,10 +276,12 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
|
|||
features.push("otherapppromotions");
|
||||
features.push("displaymode");
|
||||
features.push("targetblank");
|
||||
// allows users to connect to more than one server
|
||||
//features.push("multiserver");
|
||||
features.push("screensaver");
|
||||
|
||||
if (webSettings.getMultiserver()) {
|
||||
features.push("multiserver")
|
||||
}
|
||||
|
||||
if (!browser.orsay && !browser.tizen && !browser.msie && (browser.firefox || browser.ps4 || browser.edge || supportsCue())) {
|
||||
features.push("subtitleappearancesettings");
|
||||
}
|
||||
|
|
3
src/config.example.json
Normal file
3
src/config.example.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"multiserver": true
|
||||
}
|
30
src/scripts/settings/webSettings.js
Normal file
30
src/scripts/settings/webSettings.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
define(['appStorage', 'events'], function (appStorage, events) {
|
||||
'use strict';
|
||||
|
||||
function readConfig(path, callback) {
|
||||
var file = new XMLHttpRequest();
|
||||
file.overrideMimeType("application/json");
|
||||
file.open("GET", path, true);
|
||||
file.onreadystatechange = function() {
|
||||
if (file.readyState === 4 && file.status == "200") {
|
||||
callback(file.responseText);
|
||||
}
|
||||
}
|
||||
|
||||
file.send(null);
|
||||
}
|
||||
|
||||
var data = {};
|
||||
|
||||
function WebSettings() {
|
||||
readConfig("/config.json", function(text) {
|
||||
data = JSON.parse(text);
|
||||
});
|
||||
}
|
||||
|
||||
WebSettings.prototype.getMultiserver = function () {
|
||||
return data.multiserver !== false;
|
||||
};
|
||||
|
||||
return new WebSettings();
|
||||
});
|
|
@ -809,6 +809,7 @@ var AppInfo = {};
|
|||
|
||||
define("appSettings", [scriptsPath + "/settings/appSettings"], returnFirstDependency);
|
||||
define("userSettings", [scriptsPath + "/settings/userSettings"], returnFirstDependency);
|
||||
define("webSettings", [scriptsPath + "/settings/webSettings"], returnFirstDependency);
|
||||
|
||||
define("chromecastHelper", [componentsPath + "/chromecast/chromecasthelpers"], returnFirstDependency);
|
||||
define("mediaSession", [componentsPath + "/playback/mediasession"], returnFirstDependency);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue