mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-10-06 22:32:41 +07:00
feat: Welcome Video.js player v8.23.3
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import './VideoJS.css';
|
||||
|
||||
import VideoJS from './VideoJS.jsx';
|
||||
|
||||
// Mount the components when the DOM is ready
|
||||
const mountComponents = () => {
|
||||
const rootContainer = document.getElementById('video-js-root');
|
||||
if (rootContainer) {
|
||||
const root = createRoot(rootContainer);
|
||||
root.render(
|
||||
<StrictMode>
|
||||
<VideoJS />
|
||||
</StrictMode>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', mountComponents);
|
||||
} else {
|
||||
mountComponents();
|
||||
}
|
||||
Reference in New Issue
Block a user