-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.component.ts
More file actions
34 lines (32 loc) · 946 Bytes
/
Copy pathapp.component.ts
File metadata and controls
34 lines (32 loc) · 946 Bytes
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
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common'; // Import CommonModule for NgIf
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule], // Use CommonModule for NgIf
schemas: [CUSTOM_ELEMENTS_SCHEMA], // Allow Web Components
template: `
<h1>Simple Interactive Video Example</h1>
<iv-interactive-video
[videoUrl]="'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'"
[cues]="[
{
id: 'cue-1',
time: 5,
payload: {
type: 'text',
data: {
text: 'This is a simple text overlay.',
},
},
}
]"
(analyticsEvent)="onAnalyticsEvent($event)"
></iv-interactive-video>
`,
})
export class AppComponent {
onAnalyticsEvent(event: any) {
console.log('Analytics Event:', event);
}
}