forked from 0x2620/pandora
handle cantPlay in clip lists
This commit is contained in:
parent
4841e2c0a8
commit
08a792b68a
1 changed files with 12 additions and 2 deletions
|
@ -170,6 +170,8 @@ pandora.ui.clipList = function(videoRatio) {
|
||||||
censored: pandora.site.capabilities.canPlayClips[pandora.user.level] < result.data.rightslevel
|
censored: pandora.site.capabilities.canPlayClips[pandora.user.level] < result.data.rightslevel
|
||||||
? [{'in': partsAndPoints.points[0], out: partsAndPoints.points[1]}]
|
? [{'in': partsAndPoints.points[0], out: partsAndPoints.points[1]}]
|
||||||
: [],
|
: [],
|
||||||
|
censoredIcon: pandora.site.cantPlay.icon,
|
||||||
|
censoredTooltip: pandora.site.cantPlay.text,
|
||||||
height: height,
|
height: height,
|
||||||
'in': partsAndPoints.points[0],
|
'in': partsAndPoints.points[0],
|
||||||
out: partsAndPoints.points[1],
|
out: partsAndPoints.points[1],
|
||||||
|
@ -184,9 +186,17 @@ pandora.ui.clipList = function(videoRatio) {
|
||||||
})
|
})
|
||||||
.addClass('OxTarget')
|
.addClass('OxTarget')
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
censored: function() {
|
||||||
|
pandora.URL.push(pandora.site.cantPlay.link);
|
||||||
|
},
|
||||||
// doubleclick opens item
|
// doubleclick opens item
|
||||||
singleclick: function() {
|
singleclick: function(e) {
|
||||||
$player.$element.is('.OxSelectedVideo') && $player.togglePaused();
|
if (
|
||||||
|
$player.$element.is('.OxSelectedVideo')
|
||||||
|
&& !$(e.target).is('.OxCensoredIcon')
|
||||||
|
) {
|
||||||
|
$player.togglePaused();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$img.replaceWith($player.$element);
|
$img.replaceWith($player.$element);
|
||||||
|
|
Loading…
Reference in a new issue