aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/components/Video.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/components/Video.tsx')
-rw-r--r--src/frontend/components/Video.tsx22
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();