forked from 0x2620/pandora
fix issues with home and tv
This commit is contained in:
parent
dfd3a4481f
commit
d51deff865
5 changed files with 25 additions and 5 deletions
|
@ -260,7 +260,7 @@ pandora.URL = (function() {
|
||||||
pandora.$ui.home.fadeOutScreen();
|
pandora.$ui.home.fadeOutScreen();
|
||||||
} else if (pandora.$ui.tv) {
|
} else if (pandora.$ui.tv) {
|
||||||
pandora.UI.set({page: ''});
|
pandora.UI.set({page: ''});
|
||||||
pandora.$ui.home.fadeOutScreen();
|
pandora.$ui.tv.fadeOutScreen();
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
pandora.user.ui.item
|
pandora.user.ui.item
|
||||||
|
|
|
@ -37,6 +37,10 @@ pandora.ui.appPanel = function() {
|
||||||
});
|
});
|
||||||
function setPage(page) {
|
function setPage(page) {
|
||||||
if (page === '') {
|
if (page === '') {
|
||||||
|
if (pandora.$ui.home && pandora.$ui.appPanel) {
|
||||||
|
// unless we're on page load, remove home screen
|
||||||
|
pandora.$ui.home.fadeOutScreen();
|
||||||
|
}
|
||||||
['site', 'account', 'preferences', 'help'].forEach(function(dialog) {
|
['site', 'account', 'preferences', 'help'].forEach(function(dialog) {
|
||||||
pandora.$ui[dialog + 'Dialog'] && pandora.$ui[dialog + 'Dialog'].close();
|
pandora.$ui[dialog + 'Dialog'] && pandora.$ui[dialog + 'Dialog'].close();
|
||||||
});
|
});
|
||||||
|
@ -81,6 +85,7 @@ pandora.ui.appPanel = function() {
|
||||||
pandora.$ui.tv = pandora.ui.tv()[
|
pandora.$ui.tv = pandora.ui.tv()[
|
||||||
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen'
|
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen'
|
||||||
]();
|
]();
|
||||||
|
pandora.$ui.home && pandora.$ui.tv.mute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
|
|
|
@ -11,7 +11,7 @@ pandora.ui.home = function() {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
zIndex: 1000
|
zIndex: 1001
|
||||||
}),
|
}),
|
||||||
$reflectionImage = $('<img>')
|
$reflectionImage = $('<img>')
|
||||||
.attr({src: '/static/png/logo256.png'})
|
.attr({src: '/static/png/logo256.png'})
|
||||||
|
@ -260,6 +260,7 @@ pandora.ui.home = function() {
|
||||||
that.animate({opacity: 0}, 500, function() {
|
that.animate({opacity: 0}, 500, function() {
|
||||||
that.remove();
|
that.remove();
|
||||||
});
|
});
|
||||||
|
pandora.$ui.tv && pandora.$ui.tv.unmute();
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ pandora.ui.home = function() {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
zIndex: 1000
|
zIndex: 1001
|
||||||
}),
|
}),
|
||||||
$box = $('<div>')
|
$box = $('<div>')
|
||||||
.css({
|
.css({
|
||||||
|
@ -573,6 +573,7 @@ pandora.ui.home = function() {
|
||||||
that.animate({opacity: 0}, 500, function() {
|
that.animate({opacity: 0}, 500, function() {
|
||||||
that.remove();
|
that.remove();
|
||||||
});
|
});
|
||||||
|
pandora.$ui.tv && pandora.$ui.tv.unmute();
|
||||||
self.keydown && Ox.$document.unbind({keydown: self.keydown});
|
self.keydown && Ox.$document.unbind({keydown: self.keydown});
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,8 @@ pandora.ui.tv = function() {
|
||||||
}),
|
}),
|
||||||
$player,
|
$player,
|
||||||
list = pandora.user.ui._list,
|
list = pandora.user.ui._list,
|
||||||
lists = [];
|
lists = [],
|
||||||
|
muted;
|
||||||
|
|
||||||
function getList(direction) {
|
function getList(direction) {
|
||||||
lists.length == 0 && getLists();
|
lists.length == 0 && getLists();
|
||||||
|
@ -54,6 +55,7 @@ pandora.ui.tv = function() {
|
||||||
enableSubtitles: pandora.user.ui.videoSubtitles,
|
enableSubtitles: pandora.user.ui.videoSubtitles,
|
||||||
fullscreen: true,
|
fullscreen: true,
|
||||||
logo: pandora.site.tv.showLogo ? '/static/png/logo256.png' : '',
|
logo: pandora.site.tv.showLogo ? '/static/png/logo256.png' : '',
|
||||||
|
muted: muted || pandora.user.ui.videoMuted,
|
||||||
position: result.data.position,
|
position: result.data.position,
|
||||||
resolution: pandora.user.ui.videoResolution,
|
resolution: pandora.user.ui.videoResolution,
|
||||||
scaleToFill: pandora.user.ui.videoScale == 'fill',
|
scaleToFill: pandora.user.ui.videoScale == 'fill',
|
||||||
|
@ -73,7 +75,8 @@ pandora.ui.tv = function() {
|
||||||
close: that.fadeOutScreen,
|
close: that.fadeOutScreen,
|
||||||
ended: play,
|
ended: play,
|
||||||
muted: function(data) {
|
muted: function(data) {
|
||||||
pandora.UI.set('videoMuted', data.muted);
|
Ox.print('!MUTED', !muted)
|
||||||
|
!muted && pandora.UI.set('videoMuted', data.muted);
|
||||||
},
|
},
|
||||||
open: function() {
|
open: function() {
|
||||||
var item = result.data.item,
|
var item = result.data.item,
|
||||||
|
@ -150,12 +153,22 @@ pandora.ui.tv = function() {
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
that.mute = function() {
|
||||||
|
muted = true;
|
||||||
|
$player && $player.options({muted: muted});
|
||||||
|
};
|
||||||
|
|
||||||
that.showScreen = function() {
|
that.showScreen = function() {
|
||||||
that.css({opacity: 1}).appendTo(Ox.UI.$body);
|
that.css({opacity: 1}).appendTo(Ox.UI.$body);
|
||||||
play();
|
play();
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
that.unmute = function() {
|
||||||
|
$player && $player.options({muted: pandora.user.ui.videoMuted});
|
||||||
|
muted = false;
|
||||||
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue