Mercurial > code > home > repos > video
comparison 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 |
comparison
equal
deleted
inserted
replaced
1:f036a4955ad2 | 2:78c1a2983010 |
---|---|
1 | |
2 import { LitElement, html } from "lit"; | |
3 import { customElement, property } from "lit/decorators.js"; | |
4 import "shaka-video-element"; | |
5 | |
6 @customElement("video-section") | |
7 export class VideoSection extends LitElement { | |
8 @property({ type: String }) manifest: string | undefined; | |
9 @property({ type: String }) title: string = "(unknown)"; | |
10 render() { | |
11 return html` | |
12 <style> | |
13 section { | |
14 background: #ffffff14; | |
15 display: inline-block; | |
16 padding: 10px; | |
17 color: white; | |
18 } | |
19 </style> | |
20 <section> | |
21 <h1>${this.title}</h1> | |
22 <shaka-video id="video" width="720" height="480" src="${this.manifest}" controls></video> | |
23 </section> | |
24 `; | |
25 } | |
26 } |