diff --git a/static/js/pandora/appPanel.js b/static/js/pandora/appPanel.js index 43f8437e..ca263dfe 100644 --- a/static/js/pandora/appPanel.js +++ b/static/js/pandora/appPanel.js @@ -36,7 +36,13 @@ pandora.ui.appPanel = function() { } }); function setPage(page) { - if (page == 'home') { + if (page === '') { + if (pandora.$ui.home) { + pandora.$ui.home.fadeOutScreen(); + } else if (pandora.$ui.tv) { + pandora.$ui.tv.fadeOutScreen(); + } + } else if (page == 'home') { // if we're on page load, show screen immediately pandora.$ui.home = pandora.ui.home()[ !pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen' diff --git a/static/js/pandora/tv.js b/static/js/pandora/tv.js index c4ef6b4b..15429360 100644 --- a/static/js/pandora/tv.js +++ b/static/js/pandora/tv.js @@ -24,7 +24,7 @@ pandora.ui.tv = function() { $player = Ox.VideoPlayer({ censored: videoOptions.censored, controlsBottom: ['volume', 'scale', 'timeline', 'position', 'settings'], - controlsTop: ['close', 'title'], + controlsTop: ['close', 'title', 'open'], duration: result.data.duration, enableSubtitles: pandora.user.ui.videoSubtitles, fullscreen: true, @@ -52,6 +52,17 @@ pandora.ui.tv = function() { muted: function(data) { pandora.UI.set('videoMuted', data.muted); }, + open: function() { + var set = { + item: result.data.item, + itemView: pandora.user.ui.videoView, + page: '' + }; + set[ + 'videoPoints.' + result.data.item + '.position' + ] = $player.options('position'); + pandora.UI.set(set); + }, resolution: function(data) { pandora.UI.set('videoResolution', data.resolution); },