diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-04-29 13:26:09 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-04-29 13:26:09 -0400 |
| commit | 042d4fa9523edb9b0613902d67452df10078c836 (patch) | |
| tree | 377a856295cdefa79ff5f807b1370c975e899e7a /src/frontend/components/Video.tsx | |
| parent | 9d9614ad8a4a1d00f7df1b0e37ec32d324151335 (diff) | |
| download | xesite-yarn.tar.xz xesite-yarn.zip | |
fucking horrible typescript garbageyarn
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'src/frontend/components/Video.tsx')
| -rw-r--r-- | src/frontend/components/Video.tsx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/frontend/components/Video.tsx b/src/frontend/components/Video.tsx index 812e6bd..1d83319 100644 --- a/src/frontend/components/Video.tsx +++ b/src/frontend/components/Video.tsx @@ -1,7 +1,5 @@ -// @jsxImportSource xeact -// @jsxRuntime automatic - -import Hls from "@hls.js"; +import Hls from "hls.js"; +import { h } from "@xeserv/xeact"; export interface VideoProps { path: string; @@ -9,16 +7,12 @@ export interface VideoProps { export default function Video({ path }: VideoProps) { const streamURL = - `https://cdn.xeiaso.net/file/christine-static/${path}/index.m3u8`; - const video = ( - <video style="width:100%" controls> - <source src={streamURL} type="application/vnd.apple.mpegurl" /> - <source - src="https://cdn.xeiaso.net/file/christine-static/blog/HLSBROKE.mp4" - type="video/mp4" - /> - </video> - ); + `https://cdn.xeiaso.net/file/christine-static/${path}/index.m3u8`; + const video: HTMLVideoElement = + h("video", {style: "width:100%", controls: true}, [ + h("source", {src: streamURL, type: "application/vnd.apple.mpegurl"}, []), + h("source", {src: "https://cdn.xeiaso.net/file/christine-static/blog/HLSBROKE.mp4", type: "video/mp4"}, []) + ]) as unknown as HTMLVideoElement; if (Hls.isSupported()) { const hls = new Hls(); |
