Video.js fixes and improvements after major upgrade (#1413)

This commit is contained in:
Yiannis Christodoulou
2025-10-27 11:53:35 +02:00
committed by GitHub
parent a5e6e7b9ca
commit 2a0cb977f2
30 changed files with 478 additions and 6138 deletions

View File

@@ -16,6 +16,7 @@ import React, { useEffect, useRef } from 'react';
const VideoJSEmbed = ({
data,
useRoundedCorners,
version,
isPlayList,
playerVolume,
playerSoundMuted,
@@ -67,6 +68,7 @@ const VideoJSEmbed = ({
window.MEDIA_DATA = {
data: data || {},
useRoundedCorners: useRoundedCorners,
version: version,
isPlayList: isPlayList,
playerVolume: playerVolume || 0.5,
playerSoundMuted: playerSoundMuted || (urlMuted === '1'),
@@ -204,14 +206,14 @@ const VideoJSEmbed = ({
if (!existingCSS) {
const cssLink = document.createElement('link');
cssLink.rel = 'stylesheet';
cssLink.href = siteUrl + '/static/video_js/video-js.css';
cssLink.href = siteUrl + '/static/video_js/video-js.css?v=' + version;
document.head.appendChild(cssLink);
}
// Load JS if not already loaded
if (!existingJS) {
const script = document.createElement('script');
script.src = siteUrl + '/static/video_js/video-js.js';
script.src = siteUrl + '/static/video_js/video-js.js?v=' + version;
document.head.appendChild(script);
}
};