mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-03-22 04:33:09 -04:00
* Added frontend development files/environment * More items-categories related removals * Improvements in pages templates (inc. static pages) * Improvements in video player * Added empty home page message + cta * Updates in media, playlist and management pages * Improvements in material icons font loading * Replaced media & playlists links in frontend dev-env * frontend package version update * chnaged frontend dev url port * static files update * Changed default position of theme switcher * enabled frontend docker container
43 lines
1.2 KiB
JavaScript
Executable File
43 lines
1.2 KiB
JavaScript
Executable File
let EMBEDDED = null;
|
|
|
|
export function init(embeddedVideo) {
|
|
EMBEDDED = {
|
|
video: {
|
|
dimensions: {
|
|
width: 560,
|
|
widthUnit: 'px', // Valid values: 'px', 'percent'
|
|
height: 315,
|
|
heightUnit: 'px', // Valid values: 'px', 'percent'
|
|
},
|
|
},
|
|
};
|
|
|
|
if (void 0 !== embeddedVideo) {
|
|
if (void 0 !== embeddedVideo.initialDimensions) {
|
|
if (!isNaN(embeddedVideo.initialDimensions.width)) {
|
|
EMBEDDED.video.dimensions.width = embeddedVideo.initialDimensions.width;
|
|
}
|
|
|
|
if ('string' === typeof embeddedVideo.initialDimensions.widthUnit) {
|
|
if ('percent' === embeddedVideo.initialDimensions.widthUnit) {
|
|
embeddedVideo.initialDimensions.widthUnit = 'percent';
|
|
}
|
|
}
|
|
|
|
if (!isNaN(embeddedVideo.initialDimensions.height)) {
|
|
EMBEDDED.video.dimensions.height = embeddedVideo.initialDimensions.height;
|
|
}
|
|
|
|
if ('string' === typeof embeddedVideo.initialDimensions.heightUnit) {
|
|
if ('percent' === embeddedVideo.initialDimensions.heightUnit) {
|
|
embeddedVideo.initialDimensions.heightUnit = 'percent';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
export function settings() {
|
|
return EMBEDDED;
|
|
}
|