forked from 0x2620/pandora
fix embed player w/o in/out
This commit is contained in:
parent
81ec62802a
commit
ededd2bd4b
1 changed files with 6 additions and 4 deletions
|
@ -21,7 +21,7 @@ Ox.load('UI', {
|
||||||
pandora.user.ui.item = options.item;
|
pandora.user.ui.item = options.item;
|
||||||
pandora.api.get({id: options.item, keys: videoKeys}, function(result) {
|
pandora.api.get({id: options.item, keys: videoKeys}, function(result) {
|
||||||
var data = getVideoOptions(result.data);
|
var data = getVideoOptions(result.data);
|
||||||
that.append(pandora.$player = Ox.VideoPlayer({
|
that.append(pandora.$player = Ox.VideoPlayer(Ox.extend({
|
||||||
censored: data.censored,
|
censored: data.censored,
|
||||||
censoredIcon: pandora.site.cantPlay.icon,
|
censoredIcon: pandora.site.cantPlay.icon,
|
||||||
censoredTooltip: pandora.site.cantPlay.text,
|
censoredTooltip: pandora.site.cantPlay.text,
|
||||||
|
@ -39,9 +39,7 @@ Ox.load('UI', {
|
||||||
enableVolume: true,
|
enableVolume: true,
|
||||||
externalControls: false,
|
externalControls: false,
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
'in': options['in'],
|
|
||||||
invertHighlight: true,
|
invertHighlight: true,
|
||||||
out: options.out,
|
|
||||||
paused: options.paused,
|
paused: options.paused,
|
||||||
position: options['in'],
|
position: options['in'],
|
||||||
poster: '/' + options.item + '/' + '96p' + options['in'] +'.jpg',
|
poster: '/' + options.item + '/' + '96p' + options['in'] +'.jpg',
|
||||||
|
@ -53,7 +51,11 @@ Ox.load('UI', {
|
||||||
title: result.data.title,
|
title: result.data.title,
|
||||||
video: data.video,
|
video: data.video,
|
||||||
width: window.innerWidth
|
width: window.innerWidth
|
||||||
})
|
}, options['in'] ? {
|
||||||
|
'in': options['in']
|
||||||
|
} : {}, options.out ? {
|
||||||
|
out: options.out
|
||||||
|
} : {}))
|
||||||
.bindEvent(Ox.extend({
|
.bindEvent(Ox.extend({
|
||||||
open: function() {
|
open: function() {
|
||||||
pandora.$player.options({paused: true});
|
pandora.$player.options({paused: true});
|
||||||
|
|
Loading…
Reference in a new issue