mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-10-06 22:32:41 +07:00
feat: User rounded corners based on py value USE_ROUNDED_CORNERS
This commit is contained in:
@@ -15,6 +15,7 @@ import React, { useEffect, useRef } from 'react';
|
||||
|
||||
const VideoJSEmbed = ({
|
||||
data,
|
||||
useRoundedCorners,
|
||||
playerVolume,
|
||||
playerSoundMuted,
|
||||
videoQuality,
|
||||
@@ -63,7 +64,8 @@ const VideoJSEmbed = ({
|
||||
const urlMuted = getUrlParameter('muted');
|
||||
|
||||
window.MEDIA_DATA = {
|
||||
data: data || {}, // TODO: Check if this is needed
|
||||
data: data || {},
|
||||
useRoundedCorners: useRoundedCorners,
|
||||
playerVolume: playerVolume || 0.5,
|
||||
playerSoundMuted: playerSoundMuted || (urlMuted === '1'),
|
||||
videoQuality: videoQuality || 'auto',
|
||||
|
||||
@@ -393,6 +393,7 @@ export default class VideoViewer extends React.PureComponent {
|
||||
{(site) => {
|
||||
return React.createElement(VideoJSEmbed, {
|
||||
data: this.props.data,
|
||||
useRoundedCorners: site.useRoundedCorners,
|
||||
playerVolume: this.browserCache.get('player-volume'),
|
||||
playerSoundMuted: this.browserCache.get('player-sound-muted'),
|
||||
videoQuality: this.browserCache.get('video-quality'),
|
||||
|
||||
@@ -6,6 +6,7 @@ export function init(settings) {
|
||||
url: '',
|
||||
api: '',
|
||||
title: '',
|
||||
useRoundedCorners: true,
|
||||
};
|
||||
|
||||
if (void 0 !== settings) {
|
||||
@@ -24,6 +25,10 @@ export function init(settings) {
|
||||
if ('string' === typeof settings.title) {
|
||||
SITE.title = settings.title.trim();
|
||||
}
|
||||
|
||||
if ('boolean' === typeof settings.useRoundedCorners) {
|
||||
SITE.useRoundedCorners = settings.useRoundedCorners;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ module.exports = {
|
||||
title: process.env.MEDIACMS_TITLE || 'MediaCMS Demo',
|
||||
url: process.env.MEDIACMS_URL || 'UNDEFINED_URL',
|
||||
api: process.env.MEDIACMS_API || 'UNDEFINED_API',
|
||||
useRoundedCorners: true,
|
||||
theme: {
|
||||
mode: 'light', // Valid values: 'light', 'dark'.
|
||||
switch: {
|
||||
|
||||
Reference in New Issue
Block a user