add open button to tv player

This commit is contained in:
rolux 2011-12-23 10:51:53 +00:00
parent 5e1a2234ee
commit f6592147dd
2 changed files with 19 additions and 2 deletions

View File

@ -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'

View File

@ -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);
},