update cinema mode on/off setting
This commit is contained in:
parent
8fe136f23c
commit
ab30128e67
8 changed files with 40 additions and 13 deletions
|
@ -56,6 +56,24 @@
|
|||
|
||||
return appStorage.getItem('externalplayers') == 'true';
|
||||
},
|
||||
enableCinemaMode: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
update('enableCinemaMode', val.toString());
|
||||
}
|
||||
|
||||
val = appStorage.getItem('enableCinemaMode');
|
||||
|
||||
if (val) {
|
||||
return val != 'false';
|
||||
}
|
||||
|
||||
if ($.browser.mobile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
enableFullScreen: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
|
|
|
@ -36,9 +36,6 @@
|
|||
return targets;
|
||||
};
|
||||
|
||||
var canPlayAac = document.createElement('audio').canPlayType('audio/aac').replace(/no/, '');
|
||||
var canPlayMp3 = document.createElement('audio').canPlayType('audio/mp3').replace(/no/, '');
|
||||
|
||||
self.getVideoQualityOptions = function (videoWidth, videoHeight) {
|
||||
|
||||
var bitrateSetting = AppSettings.maxStreamingBitrate();
|
||||
|
@ -130,6 +127,8 @@
|
|||
|
||||
var canPlayWebm = supportedFormats.indexOf('webm') != -1;
|
||||
var canPlayAc3 = supportedFormats.indexOf('ac3') != -1;
|
||||
var canPlayAac = supportedFormats.indexOf('aac') != -1;
|
||||
var canPlayMp3 = supportedFormats.indexOf('mp3') != -1;
|
||||
|
||||
var profile = {};
|
||||
|
||||
|
@ -1868,6 +1867,14 @@
|
|||
if (canPlayH264) {
|
||||
list.push('h264');
|
||||
}
|
||||
|
||||
if (document.createElement('audio').canPlayType('audio/aac').replace(/no/, '')) {
|
||||
list.push('aac');
|
||||
}
|
||||
if (document.createElement('audio').canPlayType('audio/mp3').replace(/no/, '')) {
|
||||
list.push('mp3');
|
||||
}
|
||||
|
||||
supportedFormats = list;
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").trigger('change');
|
||||
|
||||
page.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
||||
page.querySelector('.chkEnableCinemaMode').checked = user.Configuration.EnableCinemaMode || false;
|
||||
page.querySelector('.chkEnableCinemaMode').checked = AppSettings.enableCinemaMode();
|
||||
page.querySelector('.chkEnableChromecastAc3').checked = AppSettings.enableChromecastAc3();
|
||||
page.querySelector('.chkExternalVideoPlayer').checked = AppSettings.enableExternalPlayers();
|
||||
|
||||
|
@ -90,7 +90,8 @@
|
|||
|
||||
user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val();
|
||||
user.Configuration.PlayDefaultAudioTrack = page.querySelector('.chkPlayDefaultAudioTrack').checked;
|
||||
user.Configuration.EnableCinemaMode = page.querySelector('.chkEnableCinemaMode').checked;
|
||||
|
||||
AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);
|
||||
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).done(function () {
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue