@kkcompany/player 1.15.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/react.d.ts ADDED
@@ -0,0 +1,148 @@
1
+ /// <reference types="react" />
2
+
3
+ declare module 'playcraft' {
4
+ export interface SupportEnvironmentItem {
5
+ device?: { type: string };
6
+ os?: { name: string; version: string };
7
+ browser?: { name: string; version: string };
8
+ };
9
+
10
+ export interface Recommendation {
11
+ title: string;
12
+ content: React.ReactNode;
13
+ };
14
+
15
+ export interface PlayerInstance {
16
+ load(): void;
17
+ };
18
+
19
+ export const getEnterpriseDrmConfig: function;
20
+ export const getBVKDrmConfig: function;
21
+
22
+ export interface PlayerProps {
23
+ ref?: MutableRefObject<PlayerInstance>;
24
+ licenseKey: string;
25
+ config?: object;
26
+ host?: string;
27
+ accessToken?: string;
28
+ deviceId?: string;
29
+ content?: {
30
+ contentId: number | string;
31
+ contentType: 'videos' | 'lives';
32
+ };
33
+ customHeader?: object;
34
+ customQuery?: object;
35
+ lang?: 'en' | 'ja' | 'zh-TW';
36
+ langCustomCode?: object;
37
+ preload?: 'auto' | 'none';
38
+ autoplay?: boolean;
39
+ autoplayNext?: boolean;
40
+ startTime?: number;
41
+ quality?: string | number | {
42
+ default: string | number;
43
+ getQualityText?({width: number, height: number}): string;
44
+ qualitySelectionHack: boolean;
45
+ };
46
+ mediaSource?: string;
47
+ thumbnailSeeking?: boolean;
48
+ supportEnvironmentList?: Array<SupportEnvironmentItem>;
49
+ limitOnePlaybackAtSameTime?: boolean;
50
+ recommendation?: Recommendation;
51
+ coverImageUrl?: string;
52
+ widevine?: 'force-l1' | 'device' | 'auto' | 'force-l3';
53
+ plugins?: Array;
54
+ drm?(object): any;
55
+ sentry?(object): any;
56
+
57
+ onSourceLoaded?(): void;
58
+ onReady?(): void;
59
+ onPlay?(): void;
60
+ onPaused?(): void;
61
+ onPlaying?(): void;
62
+ onEnded?(): void;
63
+ onError?(error: object): void;
64
+ onBack?(contentId: number | string): void;
65
+ onTimeChanged?(currentTime: number): void;
66
+ onSeek?(seekTarget: number, position: number): void;
67
+ onSeeked?(currentTime: number): void;
68
+ onVolumeChanged?(targetVolume: number, sourceVolume: number): void;
69
+ onMuted?(): void;
70
+ onUnmuted?(): void;
71
+ onVideoQualityChanged?(targetQuality: string, sourceQuality: string): void;
72
+ onMediaSourceChanged?(mediaSource: string): void;
73
+ onViewModeChange?(viewModeChangedEvent: object): void;
74
+ onEnterFullscreen?(): void;
75
+ onExitFullscreen?(): void;
76
+ onStallStarted?(): void;
77
+ onStallEnded?(): void;
78
+ onReplay?(): void;
79
+ onChangeVideo?(content: object): void;
80
+ onChangeToNextVideo?(content: object): void;
81
+ onChangeToPreviousVideo?(content: object): void;
82
+ onLogging?(type: string, property: object): void;
83
+ onSectionChange?(sectionChangedEvent: object): void;
84
+ };
85
+
86
+ export const Player: React.FunctionComponent<PlayerProps>;
87
+ }
88
+
89
+ declare module 'playcraft/react' {
90
+ export interface Intl {
91
+ locale?: string,
92
+ messages?: object,
93
+ }
94
+
95
+ export interface PremiumPlayerProps {
96
+ source: object;
97
+ startTime?: number;
98
+ autoplay?: boolean;
99
+ title?: string;
100
+ quality?: object;
101
+ bitmovin?: object;
102
+ videoRef?: React.useRef<HTMLVideoElement>,
103
+ playbackState?: string;
104
+ currentTime?: number;
105
+ playbackRate?: number;
106
+ volume?: number;
107
+ thumbnailsUrl?: string;
108
+ drm?: object;
109
+ intl?: Intl;
110
+ controls?: object;
111
+ plugins?: object[];
112
+ onError?: function;
113
+ onPlaybackStateChange?: function;
114
+ onBack?: functoin;
115
+ onChangeNext?: function;
116
+ onChangePrevious?: function;
117
+ onOpenSettings?: function;
118
+ onChangeSettings?: function;
119
+ sendLog?: function;
120
+ }
121
+ export const PremiumPlayer: React.FunctionComponent<PremiumPlayerProps>;
122
+
123
+ export interface CoverImageProps {
124
+ src?: string
125
+ };
126
+ export const CoverImage: React.FunctionComponent<CoverImageProps>;
127
+
128
+ export const FunctionBarExtension = React.FunctionComponent;
129
+ export const InfoBarExtension = React.FunctionComponent;
130
+ export const TitleBarExtension = React.FunctionComponent;
131
+ }
132
+
133
+ declare module 'playcraft/modules' {
134
+ export const createApi: function;
135
+ export const startSession: function;
136
+ export const getContentInfo: function;
137
+ export const getStreamInfo: function;
138
+ export const mapLogEvents: function;
139
+ export const logEventNames: function;
140
+ export const selectHlsQualities: function;
141
+ export const addSentry: function;
142
+ }
143
+
144
+ declare module 'playcraft/plugins' {
145
+ export const MediaTailorPlugin: function;
146
+ export const ImaDaiPlugin: function;
147
+ export const StallReloadPlugin: function;
148
+ }