forked from 0x2620/pandora
add open button to tv player
This commit is contained in:
parent
5e1a2234ee
commit
f6592147dd
2 changed files with 19 additions and 2 deletions
|
@ -36,7 +36,13 @@ pandora.ui.appPanel = function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
function setPage(page) {
|
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
|
// if we're on page load, show screen immediately
|
||||||
pandora.$ui.home = pandora.ui.home()[
|
pandora.$ui.home = pandora.ui.home()[
|
||||||
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen'
|
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen'
|
||||||
|
|
|
@ -24,7 +24,7 @@ pandora.ui.tv = function() {
|
||||||
$player = Ox.VideoPlayer({
|
$player = Ox.VideoPlayer({
|
||||||
censored: videoOptions.censored,
|
censored: videoOptions.censored,
|
||||||
controlsBottom: ['volume', 'scale', 'timeline', 'position', 'settings'],
|
controlsBottom: ['volume', 'scale', 'timeline', 'position', 'settings'],
|
||||||
controlsTop: ['close', 'title'],
|
controlsTop: ['close', 'title', 'open'],
|
||||||
duration: result.data.duration,
|
duration: result.data.duration,
|
||||||
enableSubtitles: pandora.user.ui.videoSubtitles,
|
enableSubtitles: pandora.user.ui.videoSubtitles,
|
||||||
fullscreen: true,
|
fullscreen: true,
|
||||||
|
@ -52,6 +52,17 @@ pandora.ui.tv = function() {
|
||||||
muted: function(data) {
|
muted: function(data) {
|
||||||
pandora.UI.set('videoMuted', data.muted);
|
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) {
|
resolution: function(data) {
|
||||||
pandora.UI.set('videoResolution', data.resolution);
|
pandora.UI.set('videoResolution', data.resolution);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue