import '@app/styles.css'; // SimpleHlsVideo + Video.js integration sandbox — React // http://localhost:5173/simple-hls-react/ // // React equivalent of the simple-hls-html sandbox: SimpleHlsVideo inside a VJS // player with play/mute controls. SimpleHlsVideo registers itself via // useMediaAttach so the store discovers it without any querySelector. import { Container, createPlayer, MuteButton, PlayButton } from '@videojs/react'; import { PauseIcon, PlayIcon, RestartIcon, VolumeHighIcon, VolumeOffIcon } from '@videojs/react/icons'; import { SimpleHlsVideo } from '@videojs/react/media/simple-hls-video'; import { videoFeatures } from '@videojs/react/video'; import { createRoot } from 'react-dom/client'; const { Provider } = createPlayer({ features: videoFeatures }); const buttonStyle: React.CSSProperties = { background: 'none', border: 'none', color: 'white', cursor: 'pointer', display: 'flex', alignItems: 'center', padding: '6px', borderRadius: '4px', }; function App() { return (
( )} /> ( )} />
); } createRoot(document.getElementById('root')!).render();