fix embed options

This commit is contained in:
j 2020-05-30 14:33:04 +02:00
parent d82cd9b6a7
commit 1cc18c52c3
2 changed files with 12 additions and 8 deletions

View file

@ -40,7 +40,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
description: Ox._('Embed a Clip or a Full Video'),
inputs: [
'item', 'position', 'in', 'out', 'annotation', 'title',
'showTimeline', 'showAnnotations', 'matchRatio'
'showTimeline', 'showAnnotations', 'showLayers', 'matchRatio', 'timeline'
]
},
{
@ -85,7 +85,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
description: Ox._('Embed an Edited Video'),
inputs: [
'edit', 'editMode', 'position',
'showTimeline', 'showAnnotations', 'matchRatio'
'showTimeline', 'showAnnotations', 'showLayers', 'matchRatio', 'timeline'
]
}
].map(function(item, index) {
@ -233,8 +233,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
data = getData();
if (view == 'document') {
var prefix = type == 'iframe'
? (pandora.site.site.https ? 'https' : 'http')
+ '://' + pandora.site.site.url + '/'
? (document.location.protocol + '//' + document.location.host + '/')
: '/',
page = type == 'iframe' ? 'documents' : 'document',
resolution = 480;
@ -260,9 +259,12 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
options = Ox.serialize({
title: data.title || void 0,
showTimeline: data.showTimeline || void 0,
timeline: data.timeline || void 0,
timeline: data.showTimeline && data.timeline ? data.timeline : void 0,
showAnnotations: data.showAnnotations || void 0,
showLayers: data.showAnnotations && data.showLayers ? data.showLayers : void 0,
showLayers: data.showAnnotations && data.showLayers &&
data.showLayers.length < pandora.site.layers.length
? data.showLayers.join(',')
: void 0,
matchRatio: Ox.contains(['video', 'edit'], view) ? data.matchRatio || void 0 : void 0,
showInfo: Ox.contains(['list', 'text'], view) || (view == 'edit' && !!$input.editMode.value()) || void 0
}, true),
@ -275,8 +277,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
return Ox.encodeHTMLEntities(
(
type == 'iframe'
? (pandora.site.site.https ? 'https' : 'http')
+ '://' + pandora.site.site.url + '/'
? (document.location.protocol + '//' + document.location.host + '/')
: '/'
)
+ (

View file

@ -456,6 +456,9 @@ appPanel
videoFormat: Ox.getVideoFormat(pandora.site.video.formats)
});
pandora.site.site.url = document.location.host
pandora.site.site.https = document.location.protocol == 'https:'
Ox.Map.GoogleApiKey = pandora.site.site.googleapikey;
// set locale and initialize url controller