Update to structure

This commit is contained in:
Chris-1010
2025-01-23 12:13:50 +00:00
parent be30d9c924
commit 66957efe6f
38 changed files with 5201 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
// video.html
// src/components/Video/VideoPlayer.tsx
import React, { useEffect } from 'react';
import videojs from 'video.js';
import 'video.js/dist/video-js.css';
const VideoPlayer: React.FC = () => {
useEffect(() => {
const player = videojs('player', {
width: 1280,
height: 720,
controls: true,
preload: 'auto',
sources: [{
src: '/hls/stream.m3u8',
type: 'application/x-mpegURL'
}]
});
return () => {
if (player) {
player.dispose();
}
};
}, []);
return (
<video
id="player"
className="video-js vjs-default-skin"
/>
);
};
export default VideoPlayer;