@kinescope/angular-kinescope-player
v1.0.5
Published
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://kinescope.io/)
Downloads
3
Keywords
Readme
Installation
Using npm:
npm install @kinescope/angular-kinescope-player --save
Using yarn:
yarn add @kinescope/angular-kinescope-player
Getting Started
Basic usage
import { KinescopePlayerComponent } from '@kinescope/angular-kinescope-player';
@NgModule({
...
imports: [
...
KinescopePlayerComponent,
],
})
import { KinescopePlayerConfig, KinescopePlayerComponent } from 'angular-kinescope-player';
@Component({
...
template: '<kinescope-player #kinescope [config]="config"></kinescope-player>'
})
export class AComponent implements AfterViewInit {
config: KinescopePlayerConfig = {
videoId: '00000000',
};
@ViewChild('kinescope') private kinescope: KinescopePlayerComponent;
ngAfterViewInit() {
this.kinescope,play();
}
}
Props
Chapter
type Chapter = {
position: number;
title: string;
};
vtt
type Vtt = {
label: string;
src: string;
srcLang: string;
};
Action
type Action = (ActionToolBar | ActionCallToAction);
type ActionToolBar = {
id: string;
type: 'tool';
title?: string;
icon: 'note';
};
type ActionCallToAction = {
id: string;
type: 'cta';
title: string;
description?: string;
skipable?: boolean;
buttonStyle?: CSSProperties;
trigger: {
percentages: number[];
timePoints: number[];
pause: boolean;
};
};
Bookmark
type Bookmark = {
id: string;
time: number;
title?: string;
};
Watermark
type Watermark =
| string
| {
text: string;
mode?: WatermarkModeTypes;
scale?: number;
displayTimeout?: number | {visible: number; hidden: number};
};