forked from vime-js/vime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-home.tsx
42 lines (38 loc) · 933 Bytes
/
app-home.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { Component, h } from '@stencil/core';
@Component({
tag: 'app-home',
styleUrl: 'app-home.css',
shadow: true,
})
export class AppHome {
// Obtain a ref if you need to call any methods.
// @ts-expect-error
private player!: HTMLVmPlayerElement;
private onPlaybackReady() {
// ...
}
render() {
return (
<div class="container">
<vm-player
playsinline
onVmPlaybackReady={this.onPlaybackReady.bind(this)}
ref={el => {
this.player = el;
}}
>
<vm-video poster="https://media.vimejs.com/poster.png">
<source
data-src="https://media.vimejs.com/720p.mp4"
type="video/mp4"
/>
</vm-video>
<vm-default-ui>
{/* Custom UI Component. */}
<tap-sides-to-seek />
</vm-default-ui>
</vm-player>
</div>
);
}
}