embed player: add 'showCloseButton' option, post event messages
This commit is contained in:
parent
3e945dcc0c
commit
2f28df6109
1 changed files with 12 additions and 2 deletions
|
@ -26,8 +26,12 @@ Ox.load('UI', {
|
||||||
censoredIcon: pandora.site.cantPlay.icon,
|
censoredIcon: pandora.site.cantPlay.icon,
|
||||||
censoredTooltip: pandora.site.cantPlay.text,
|
censoredTooltip: pandora.site.cantPlay.text,
|
||||||
controlsTooltips: {open: 'Watch on ' + pandora.site.site.name},
|
controlsTooltips: {open: 'Watch on ' + pandora.site.site.name},
|
||||||
controlsTop: (Ox.Fullscreen.available ? ['fullscreen'] : []).concat(
|
controlsTop: (options.showCloseButton ? ['close'] : []).concat(
|
||||||
['space', 'open']
|
['space']
|
||||||
|
).concat(
|
||||||
|
Ox.Fullscreen.available ? ['fullscreen'] : []
|
||||||
|
).concat(
|
||||||
|
['open']
|
||||||
),
|
),
|
||||||
controlsBottom: ['play', 'volume', 'scale', 'timeline', 'position', 'settings'],
|
controlsBottom: ['play', 'volume', 'scale', 'timeline', 'position', 'settings'],
|
||||||
duration: data.duration,
|
duration: data.duration,
|
||||||
|
@ -79,6 +83,12 @@ Ox.load('UI', {
|
||||||
playing: checkRange,
|
playing: checkRange,
|
||||||
position: checkRange
|
position: checkRange
|
||||||
} : {}))
|
} : {}))
|
||||||
|
.bindEvent(function(data, event) {
|
||||||
|
window.postMessage(JSON.stringify({
|
||||||
|
event: event,
|
||||||
|
data: data
|
||||||
|
}), '*');
|
||||||
|
});
|
||||||
);
|
);
|
||||||
Ox.UI.hideLoadingScreen();
|
Ox.UI.hideLoadingScreen();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue