diff --git a/dashboard-ui/autoorganizetv.html b/dashboard-ui/autoorganizetv.html index 71bd69db7e..df8a1dea09 100644 --- a/dashboard-ui/autoorganizetv.html +++ b/dashboard-ui/autoorganizetv.html @@ -77,62 +77,62 @@
' + Globalize.translate('LabelAllPlaysSentToPlayer') + '
'; - checkedHtml = enableMirrorMode ? ' checked="checked"' : ''; + checkedHtml = isMirrorModeEnabled() ? ' checked="checked"' : ''; html += ''; html += ''; @@ -488,7 +509,7 @@ $('.players', elem).html(getTargetsHtml(targets)).trigger('create'); $('.chkEnableMirrorMode', elem).on().on('change', function () { - enableMirrorMode = this.checked; + setMirrorModeEnabled(this.checked); if (this.checked && currentDisplayInfo) { @@ -506,7 +527,6 @@ $('.fldMirrorMode', elem).show(); } else { $('.fldMirrorMode', elem).hide(); - $('.chkEnableMirrorMode', elem).checked(false).trigger('change').checkboxradio('refresh'); } }).each(function () { @@ -532,6 +552,12 @@ deviceName: deviceName }); + + if (currentDisplayInfo) { + + mirrorIfEnabled(currentDisplayInfo); + } + }); }); } @@ -610,9 +636,7 @@ currentDisplayInfo = info; - if (enableMirrorMode) { - mirrorItem(info); - } + mirrorIfEnabled(info); }); -})(jQuery, window); \ No newline at end of file +})(jQuery, window, window.store); \ No newline at end of file diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index edbcbecff5..6a4da24f22 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -200,6 +200,8 @@ self.setCurrentTrackElement = function (index) { + var modes = ['disabled', 'showing', 'hidden']; + var textStreams = self.currentMediaSource.MediaStreams.filter(function (s) { return s.Type == 'Subtitle' && s.IsTextSubtitleStream; }); @@ -219,13 +221,26 @@ var mode; if (trackIndex == i) { - mode = "showing"; // show this track + mode = 1; // show this track } else { - mode = "disabled"; // hide all other tracks + mode = 0; // hide all other tracks } console.log('Setting track ' + i + ' mode to: ' + mode); - allTracks[i].mode = mode; + + // Safari uses integers for the mode property + // http://www.jwplayer.com/html5/scripting/ + var useNumericMode = false; + + if (!isNaN(allTracks[i].mode)) { + useNumericMode = true; + } + + if (useNumericMode) { + allTracks[i].mode = mode; + } else { + allTracks[i].mode = modes[mode]; + } } }; diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index dedc5edaee..08cf56d1ee 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -555,14 +555,7 @@ self.displayContent = function (options) { // Handle it the same as a remote control command - Dashboard.onBrowseCommand({ - - ItemName: options.itemName, - ItemType: options.itemType, - ItemId: options.itemId, - Context: options.context - - }); + Dashboard.onBrowseCommand(options); }; self.getItemsForPlayback = function (query) { diff --git a/dashboard-ui/scripts/remotecontrol.js b/dashboard-ui/scripts/remotecontrol.js index 2107c66fa3..8ab76fcf8e 100644 --- a/dashboard-ui/scripts/remotecontrol.js +++ b/dashboard-ui/scripts/remotecontrol.js @@ -157,14 +157,7 @@ self.displayContent = function (options) { - sendCommandByName('DisplayContent', { - - ItemName: options.itemName, - ItemType: options.itemType, - ItemId: options.itemId, - Context: options.context - - }); + sendCommandByName('DisplayContent', options); }; self.getPlayerState = function () {