mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add bitrate setting to preferences
This commit is contained in:
parent
22dcbe1211
commit
6a1701ff3c
7 changed files with 207 additions and 97 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
var externalPlayers = JSON.parse(store.getItem('externalplayers') || '[]');
|
||||
|
||||
$('#selectMaxBitrate', page).val(AppSettings.maxStreamingBitrate()).selectmenu("refresh");
|
||||
|
||||
$('.chkExternalPlayer', page).each(function () {
|
||||
|
||||
var chk = this;
|
||||
|
@ -60,6 +62,8 @@
|
|||
|
||||
store.setItem('externalplayers', JSON.stringify(externalPlayers));
|
||||
|
||||
AppSettings.maxStreamingBitrate($('#selectMaxBitrate', page).val());
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) {
|
||||
|
@ -102,4 +106,22 @@
|
|||
onSubmit: onSubmit
|
||||
};
|
||||
|
||||
})(jQuery, window, document);
|
||||
})(jQuery, window, document);
|
||||
|
||||
(function (window, store) {
|
||||
|
||||
window.AppSettings = {
|
||||
|
||||
maxStreamingBitrate: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
store.setItem('preferredVideoBitrate', val);
|
||||
}
|
||||
|
||||
return parseInt(store.getItem('preferredVideoBitrate') || '') || 1500000;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
})(window, window.store);
|
Loading…
Add table
Add a link
Reference in a new issue