forked from 0x2620/pandora
update embed panel
This commit is contained in:
parent
31fff58b33
commit
3b0005c8ab
1 changed files with 16 additions and 8 deletions
|
@ -20,7 +20,12 @@ pandora.ui.embedPanel = function() {
|
||||||
|
|
||||||
video = Ox.extend(result.data, pandora.getVideoOptions(result.data));
|
video = Ox.extend(result.data, pandora.getVideoOptions(result.data));
|
||||||
|
|
||||||
var sizes = getSizes();
|
var isFrame = options['in'] !== void 0 && (
|
||||||
|
options['in'] == options.out
|
||||||
|
|| options['in'] == video.duration
|
||||||
|
),
|
||||||
|
sizes = getSizes();
|
||||||
|
|
||||||
options.height = sizes.videoHeight;
|
options.height = sizes.videoHeight;
|
||||||
|
|
||||||
if (options.title) {
|
if (options.title) {
|
||||||
|
@ -43,7 +48,7 @@ pandora.ui.embedPanel = function() {
|
||||||
censoredIcon: pandora.site.cantPlay.icon,
|
censoredIcon: pandora.site.cantPlay.icon,
|
||||||
censoredTooltip: pandora.site.cantPlay.text,
|
censoredTooltip: pandora.site.cantPlay.text,
|
||||||
controlsBottom: (
|
controlsBottom: (
|
||||||
options['in'] == options.out ? [] : ['play', 'volume']
|
isFrame ? [] : ['play', 'volume']
|
||||||
).concat(
|
).concat(
|
||||||
['scale']
|
['scale']
|
||||||
).concat(
|
).concat(
|
||||||
|
@ -64,12 +69,12 @@ pandora.ui.embedPanel = function() {
|
||||||
),
|
),
|
||||||
duration: video.duration,
|
duration: video.duration,
|
||||||
enableFullscreen: Ox.Fullscreen.available,
|
enableFullscreen: Ox.Fullscreen.available,
|
||||||
enableKeyboard: true,
|
enableKeyboard: !isFrame,
|
||||||
enableMouse: true,
|
enableMouse: !isFrame,
|
||||||
enablePosition: true,
|
enablePosition: !isFrame,
|
||||||
enableSubtitles: true,
|
enableSubtitles: true,
|
||||||
enableTimeline: true,
|
enableTimeline: !isFrame,
|
||||||
enableVolume: true,
|
enableVolume: !isFrame,
|
||||||
height: options.height,
|
height: options.height,
|
||||||
invertHighlight: options.invertHighlight,
|
invertHighlight: options.invertHighlight,
|
||||||
muted: pandora.user.ui.videoMuted,
|
muted: pandora.user.ui.videoMuted,
|
||||||
|
@ -139,6 +144,7 @@ pandora.ui.embedPanel = function() {
|
||||||
|
|
||||||
if (options.showTimeline) {
|
if (options.showTimeline) {
|
||||||
$timeline = Ox.LargeVideoTimeline(Ox.extend({
|
$timeline = Ox.LargeVideoTimeline(Ox.extend({
|
||||||
|
disabled: isFrame,
|
||||||
duration: video.duration,
|
duration: video.duration,
|
||||||
getImageURL: function(type, i) {
|
getImageURL: function(type, i) {
|
||||||
return '/' + ui.item + '/timeline' + type + '64p' + i + '.jpg';
|
return '/' + ui.item + '/timeline' + type + '64p' + i + '.jpg';
|
||||||
|
@ -311,8 +317,10 @@ pandora.ui.embedPanel = function() {
|
||||||
}
|
}
|
||||||
if (!options['in'] && !options.out) {
|
if (!options['in'] && !options.out) {
|
||||||
options.playInToOut = false;
|
options.playInToOut = false;
|
||||||
} else if (options['in'] == options.out) {
|
} else if (options['in'] && options['in'] == options.out) {
|
||||||
options.invertHighlight = false;
|
options.invertHighlight = false;
|
||||||
|
options.paused = true;
|
||||||
|
options.playInToOut = false;
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue