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