diff --git a/dashboard-ui/nowplaying.html b/dashboard-ui/nowplaying.html index 6a513f9e9a..ab638bb746 100644 --- a/dashboard-ui/nowplaying.html +++ b/dashboard-ui/nowplaying.html @@ -9,7 +9,7 @@
${TabNowPlaying} ${TabControls} - + ${TabAdvanced}
@@ -80,29 +80,48 @@
- +
- +
+ + diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 312a75ecbb..5b87e70334 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -77,7 +77,6 @@ $("#videoControls").removeClass("inactive"); $("video").remove(); $("html").css("cursor", "default"); - $(".ui-loader").hide(); }; self.exitFullScreen = function () { @@ -860,7 +859,6 @@ //======================================================================================> // Show loading animation - $(".ui-loader").show(); $("html").css("cursor", "wait"); // Create video player @@ -996,7 +994,6 @@ self.clearPauseStop(); $("html").css("cursor", "default"); - $(".ui-loader").hide(); self.resetEnhancements(); var errorCode = this.error ? this.error.code : ''; @@ -1039,7 +1036,6 @@ }).on("canplay", function () { - $(".ui-loader").hide(); $("html").css("cursor", "default"); }).on("ended.playbackstopped", function () { diff --git a/dashboard-ui/scripts/nowplayingpage.js b/dashboard-ui/scripts/nowplayingpage.js index d762ec8302..48fb791f86 100644 --- a/dashboard-ui/scripts/nowplayingpage.js +++ b/dashboard-ui/scripts/nowplayingpage.js @@ -13,7 +13,7 @@ var elem = $('#popupAudioTrackMenu', page); - var html = '
  • Select Audio
  • '; + var html = ''; + + $('.trackList', elem).html(html).listview('refresh').trigger('create'); elem.popup('open'); } @@ -95,7 +97,7 @@ }).join(''); - $('ul', elem).html(html).listview('refresh').trigger('create'); + $('.trackList', elem).html(html).listview('refresh').trigger('create'); elem.popup('open'); } @@ -272,6 +274,8 @@ $('.btnSubtitles', page).buttonEnabled(hasStreams(item, 'Subtitle') && supportedCommands.indexOf('SetSubtitleStreamIndex') != -1); $('.btnChapters', page).buttonEnabled(item && item.Chapters && item.Chapters.length); + $('.sendMessageElement', page).buttonEnabled(supportedCommands.indexOf('DisplayMessage') != -1); + $('.btnStop', page).buttonEnabled(item != null); $('.btnNextTrack', page).buttonEnabled(item != null); $('.btnPreviousTrack', page).buttonEnabled(item != null); @@ -467,4 +471,28 @@ lastPlayerState = null; }); + window.NowPlayingPage = { + + onMessageSubmit: function () { + + var form = this; + + MediaController.sendCommand({ + Name: 'DisplayMessage', + Arguments: { + + Header: $('#txtMessageTitle', form).val(), + Text: $('#txtMessageText', form).val() + } + + }, currentPlayer); + + $('input', form).val(''); + Dashboard.alert('Message sent.'); + + return false; + } + + }; + })(window, document, jQuery, setTimeout, clearTimeout); \ No newline at end of file