mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
23 lines
742 B
TypeScript
23 lines
742 B
TypeScript
import { Video } from '@videojs/react/video';
|
|
import { createRoot } from 'react-dom/client';
|
|
import { VideoProvider } from '../shared/react/providers';
|
|
import { VideoSkinComponent } from '../shared/react/skins';
|
|
import { useSkin } from '../shared/react/use-skin';
|
|
import { useSource } from '../shared/react/use-source';
|
|
import { SOURCES } from '../shared/sources';
|
|
|
|
function App() {
|
|
const skin = useSkin();
|
|
const source = useSource();
|
|
|
|
return (
|
|
<VideoProvider>
|
|
<VideoSkinComponent skin={skin} styling="tailwind" className="w-full aspect-video max-w-4xl mx-auto">
|
|
<Video src={SOURCES[source].url} />
|
|
</VideoSkinComponent>
|
|
</VideoProvider>
|
|
);
|
|
}
|
|
|
|
createRoot(document.getElementById('root')!).render(<App />);
|