diff src/VideoSection.ts @ 2:78c1a2983010

rewrite UI and file serving parts; use vite
author drewp@bigasterisk.com
date Mon, 20 Mar 2023 20:26:02 -0700
parents
children c8a41359505c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/VideoSection.ts	Mon Mar 20 20:26:02 2023 -0700
@@ -0,0 +1,26 @@
+
+import { LitElement, html } from "lit";
+import { customElement, property } from "lit/decorators.js";
+import "shaka-video-element";
+
+@customElement("video-section")
+export class VideoSection extends LitElement {
+  @property({ type: String }) manifest: string | undefined;
+  @property({ type: String }) title: string = "(unknown)";
+  render() {
+    return html`
+      <style>
+        section {
+          background: #ffffff14;
+          display: inline-block;
+          padding: 10px;
+          color: white;
+        }
+      </style>
+      <section>
+        <h1>${this.title}</h1>
+        <shaka-video id="video" width="720" height="480" src="${this.manifest}" controls></video>
+      </section>
+    `;
+  }
+}