';;
- } else {
- html += '
';
-
- $(document.body).append(html);
-
- elem = $('.mediaPlayerAudio');
- }
-
- return $(elem)
- .on('timeupdate', onTimeUpdate)
- .on('ended', onEnded)
- .on('volumechange', onVolumeChange)
- .one('playing', onOneAudioPlaying)
- .on('play', onPlay)
- .on('pause', onPause)
- .on('playing', onPlaying)
- .on('error', onError)[0];
- }
-
- function createVideoElement() {
-
- var elem = $('.itemVideo');
-
- return $(elem)
- .one('.loadedmetadata')
- .one('playing', onOneVideoPlaying)
- .on('timeupdate', onTimeUpdate)
- .on('ended', onEnded)
- .on('volumechange', onVolumeChange)
- .on('play', onPlay)
- .on('pause', onPause)
- .on('playing', onPlaying)
- .on('error', onError)[0];
- }
-
- self.currentTime = function (val) {
-
- if (mediaElement) {
- if (val != null) {
- mediaElement.currentTime = val;
- return;
- }
-
- return mediaElement.currentTime;
- }
- };
-
- self.duration = function (val) {
-
- if (mediaElement) {
- return mediaElement.duration;
- }
-
- return null;
- };
-
- self.pause = function () {
- if (mediaElement) {
- mediaElement.pause();
- }
- };
-
- self.unpause = function () {
- if (mediaElement) {
- mediaElement.play();
- }
- };
-
- self.volume = function (val) {
- if (mediaElement) {
- if (val != null) {
- mediaElement.volume = val;
- return;
- }
-
- return mediaElement.volume;
- }
- };
-
- self.setCurrentSrc = function (val) {
-
- var elem = mediaElement;
-
- if (!elem) {
- return;
- }
-
- if (!val) {
- elem.src = null;
- elem.src = "";
-
- // When the browser regains focus it may start auto-playing the last video
- if ($.browser.safari) {
- elem.src = 'files/dummy.mp4';
- elem.play();
- }
-
- return;
- }
-
- elem.src = val;
-
- if (elem.tagName.toLowerCase() == 'audio') {
- elem.play();
- }
- else {
-
- $(elem).one("loadedmetadata.mediaplayerevent", onLoadedMetadata);
- }
- };
-
- self.currentSrc = function () {
- if (mediaElement) {
- return mediaElement.currentSrc;
- }
- };
-
- self.paused = function () {
-
- if (mediaElement) {
- return mediaElement.paused;
- }
-
- return false;
- };
-
- self.destroy = function () {
-
- self.setCurrentSrc(null);
-
- var elem = mediaElement;
-
- if (elem) {
-
- $(elem).off();
-
- if (elem.tagName.toLowerCase() != 'audio') {
- $(elem).remove();
- }
- }
- };
-
- self.setPoster = function (url) {
- var elem = mediaElement;
-
- if (elem) {
- elem.poster = url;
- }
- };
-
- if (type == 'audio') {
- mediaElement = createAudioElement();
- }
- else {
- mediaElement = createVideoElement();
- }
- }
-
- window.HtmlMediaRenderer = htmlMediaRenderer;
-
-})();
\ No newline at end of file
+})(document, setTimeout, clearTimeout, screen, window.appStorage, $, setInterval, window);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/mypreferenceswebclient.js b/dashboard-ui/scripts/mypreferenceswebclient.js
index 5b7bc5f11d..5d41c363a6 100644
--- a/dashboard-ui/scripts/mypreferenceswebclient.js
+++ b/dashboard-ui/scripts/mypreferenceswebclient.js
@@ -18,7 +18,9 @@
$('#selectEnableItemPreviews', page).val(AppSettings.enableItemPreviews().toString().toLowerCase()).selectmenu("refresh");
$('#chkEnableLibraryTileNames', page).checked(displayPreferences.CustomPrefs.enableLibraryTileNames != '0').checkboxradio("refresh");
- $('#chkEnableFullScreen', page).checked(AppSettings.enableFullScreen().toString().toLowerCase() == 'true').checkboxradio("refresh");
+ $('#chkEnableFullScreen', page).checked(AppSettings.enableFullScreen()).checkboxradio("refresh");
+
+ $('#chkEnableChromecastAc3', page).checked(AppSettings.enableChromecastAc3()).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
@@ -55,6 +57,8 @@
AppSettings.enableItemPreviews($('#selectEnableItemPreviews', page).val() == 'true');
AppSettings.enableFullScreen($('#chkEnableFullScreen', page).checked());
+ AppSettings.enableChromecastAc3($('#chkEnableChromecastAc3', page).checked());
+
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) {
diff --git a/dashboard-ui/scripts/userlibraryaccess.js b/dashboard-ui/scripts/userlibraryaccess.js
index ef844c9aca..877364386d 100644
--- a/dashboard-ui/scripts/userlibraryaccess.js
+++ b/dashboard-ui/scripts/userlibraryaccess.js
@@ -150,26 +150,22 @@
});
}
- window.LibraryAccessPage = {
+ function onSubmit() {
+ var page = $(this).parents('.page');
- onSubmit: function () {
+ Dashboard.showLoadingMsg();
- var page = $(this).parents('.page');
+ var userId = getParameterByName("userId");
- Dashboard.showLoadingMsg();
+ ApiClient.getUser(userId).done(function (result) {
+ saveUser(result, page);
+ });
- var userId = getParameterByName("userId");
+ // Disable default form submission
+ return false;
+ }
- ApiClient.getUser(userId).done(function (result) {
- saveUser(result, page);
- });
-
- // Disable default form submission
- return false;
- }
- };
-
- $(document).on('pageinit', "#userLibraryAccessPage", function () {
+ $(document).on('pageinitdepends', "#userLibraryAccessPage", function () {
var page = this;
@@ -203,7 +199,9 @@
});
- }).on('pageshow', "#userLibraryAccessPage", function () {
+ $('.userLibraryAccessForm').off('submit', onSubmit).on('submit', onSubmit);
+
+ }).on('pageshowready', "#userLibraryAccessPage", function () {
var page = this;
diff --git a/dashboard-ui/scripts/userparentalcontrol.js b/dashboard-ui/scripts/userparentalcontrol.js
index c57f19e220..a208bbba08 100644
--- a/dashboard-ui/scripts/userparentalcontrol.js
+++ b/dashboard-ui/scripts/userparentalcontrol.js
@@ -367,7 +367,7 @@
$('#txtBlockedTag', page).val('').focus();
}
- $(document).on('pageinit', "#userParentalControlPage", function () {
+ $(document).on('pageinitdepends', "#userParentalControlPage", function () {
var page = this;
@@ -384,7 +384,11 @@
populateHours(page);
- }).on('pageshow', "#userParentalControlPage", function () {
+ $('.blockedTagForm').off('submit', UserParentalControlPage.onBlockedTagFormSubmit).on('submit', UserParentalControlPage.onBlockedTagFormSubmit);
+ $('.scheduleForm').off('submit', UserParentalControlPage.onScheduleFormSubmit).on('submit', UserParentalControlPage.onScheduleFormSubmit);
+ $('.userParentalControlForm').off('submit', UserParentalControlPage.onSubmit).on('submit', UserParentalControlPage.onSubmit);
+
+ }).on('pageshowready', "#userParentalControlPage", function () {
var page = this;
diff --git a/dashboard-ui/scripts/userpassword.js b/dashboard-ui/scripts/userpassword.js
index d0bde186cd..5a83b6a531 100644
--- a/dashboard-ui/scripts/userpassword.js
+++ b/dashboard-ui/scripts/userpassword.js
@@ -28,7 +28,12 @@
});
}
- $(document).on('pagebeforeshow', "#userPasswordPage", function () {
+ $(document).on('pageinitdepends', "#userPasswordPage", function () {
+
+ $('.adminUpdatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
+ $('.adminLocalAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit);
+
+ }).on('pagebeforeshowready', "#userPasswordPage", function () {
var page = this;
diff --git a/dashboard-ui/scripts/wizardstartpage.js b/dashboard-ui/scripts/wizardstartpage.js
index 4c358c76be..68af4b7b78 100644
--- a/dashboard-ui/scripts/wizardstartpage.js
+++ b/dashboard-ui/scripts/wizardstartpage.js
@@ -22,7 +22,7 @@
config.UICulture = $('#selectLocalizationLanguage', page).val();
apiClient.ajax({
-
+
type: 'POST',
data: config,
url: apiClient.getUrl('Startup/Configuration')
@@ -36,7 +36,17 @@
}
- $(document).on('pageshow', "#wizardStartPage", function () {
+ function onSubmit() {
+ save($(this).parents('.page'));
+
+ return false;
+ }
+
+ $(document).on('pageinitdepends', "#wizardStartPage", function () {
+
+ $('.wizardStartForm').off('submit', onSubmit).on('submit', onSubmit);
+
+ }).on('pageshowready', "#wizardStartPage", function () {
Dashboard.showLoadingMsg();
var page = this;
@@ -54,14 +64,4 @@
});
});
- window.WizardStartPage = {
-
- onSubmit: function () {
-
- save($(this).parents('.page'));
-
- return false;
- }
- };
-
})(window, jQuery);
\ No newline at end of file
diff --git a/dashboard-ui/thirdparty/cordova/chromecast.js b/dashboard-ui/thirdparty/cordova/chromecast.js
index 063a5f026d..ff4f9ebebe 100644
--- a/dashboard-ui/thirdparty/cordova/chromecast.js
+++ b/dashboard-ui/thirdparty/cordova/chromecast.js
@@ -84,7 +84,8 @@
accessToken: ApiClient.accessToken(),
serverAddress: ApiClient.serverAddress(),
maxBitrate: bitrateSetting,
- receiverName: currentDevice.getFriendlyName()
+ receiverName: currentDevice.getFriendlyName(),
+ supportsAc3: AppSettings.enableChromecastAc3()
});
getEndpointInfo().done(function (endpoint) {
diff --git a/dashboard-ui/userlibraryaccess.html b/dashboard-ui/userlibraryaccess.html
index f63ccc4104..fcab15b7c3 100644
--- a/dashboard-ui/userlibraryaccess.html
+++ b/dashboard-ui/userlibraryaccess.html
@@ -4,7 +4,7 @@
-