0.4.5 • Published 4 months ago
@kinescope/react-kinescope-player v0.4.5
Installation
Using npm:
npm install @kinescope/react-kinescope-player --save
Using yarn:
yarn add @kinescope/react-kinescope-player
Getting Started
Basic usage
import React from 'react'
import KinescopePlayer from '@kinescope/react-kinescope-player';
function Player() {
return (
<KinescopePlayer videoId="00000000" />
)
}
export default Player;
Events
functions onTimeUpdate({currentTime}){
...
}
<KinescopePlayer videoId="00000000" onTimeUpdate={onTimeUpdate} />
Methods
let playerRef = React.createRef();
<KinescopePlayer ref={playerRef} videoId="00000000" />
functions handleMuteClick(){
playerRef.current.mute();
}
<button onClick={handleMuteClick}>Mute</button>
Next.js
import dynamic from 'next/dynamic'
const KinescopePlayer = dynamic(import('@kinescope/react-kinescope-player'), { ssr: false });
function Player() {
return (
<KinescopePlayer videoId="00000000" />
)
}
export default Player;
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};
};
Events
Methods
0.4.5
4 months ago
0.4.4
7 months ago
0.4.1
9 months ago
0.4.0
9 months ago
0.4.3
8 months ago
0.4.2
8 months ago
0.3.2
1 year ago
0.3.1
1 year ago
0.3.4
1 year ago
0.3.3
1 year ago
0.2.19
2 years ago
0.3.0
2 years ago
0.2.18
2 years ago
0.2.17
2 years ago
0.2.16
2 years ago
0.2.15
3 years ago
0.2.14
3 years ago
0.2.13
3 years ago
0.2.12
3 years ago
0.2.11
3 years ago
0.2.10
3 years ago
0.2.9
3 years ago
0.2.8
3 years ago
0.2.7
3 years ago
0.2.6
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago
0.0.13
3 years ago