@lazycatcloud/lzc-video-player 0.0.91 → 0.0.92
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/README.md +2 -0
- package/dist/{browser-ponyfill.ab6972b9.js → browser-ponyfill.11b38189.js} +1 -1
- package/dist/lzc-video-player.2b9b1556.js +72868 -0
- package/dist/lzc-video-player.js +2 -2
- package/dist/src/components/Video/components/LzcOverlay/SubtitleLayer.vue.d.ts +13 -0
- package/dist/src/components/Video/components/LzcOverlay/useCast.d.ts +1 -1
- package/dist/src/components/Video/components/LzcOverlay/useOctopusRenderer.d.ts +11 -0
- package/dist/src/components/Video/components/LzcOverlay/useSubtitleRenderEngine.d.ts +8 -0
- package/dist/src/components/Video/components/LzcOverlay/useSubtitleTrack.d.ts +7 -0
- package/dist/src/components/Video/native/NativePlayer.d.ts +26 -11
- package/dist/src/components/Video/native/useNativePlayerFullscreen.d.ts +1 -1
- package/dist/src/components/Video/player.d.ts +2 -0
- package/dist/src/model.d.ts +7 -1
- package/dist/src/stores/playlist.d.ts +72 -0
- package/package.json +1 -1
- package/dist/lzc-video-player.c037b1da.js +0 -72132
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
player: {
|
|
4
|
+
type: import("vue").PropType<LzcPlayer>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
player: {
|
|
9
|
+
type: import("vue").PropType<LzcPlayer>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -6,8 +6,8 @@ export declare const devices: Ref<RemoteMediaPlayer[]>;
|
|
|
6
6
|
export declare const castSubscribe: Ref<Subscription | null>;
|
|
7
7
|
export declare const castDevice: Ref<RemoteMediaPlayer | null>;
|
|
8
8
|
export declare const castLoading: Ref<boolean>;
|
|
9
|
-
export declare const castPaused: Ref<boolean>;
|
|
10
9
|
export declare function useRefresh(): void;
|
|
10
|
+
export declare function detachCastSession(): void;
|
|
11
11
|
export declare function doPlayAction(player: LzcPlayer, mediaFile: string): Promise<void>;
|
|
12
12
|
export declare function doPauseAction(): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
13
13
|
export declare function doContinueAction(): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface OctopusTrackOptions {
|
|
2
|
+
assUrl: string;
|
|
3
|
+
fonts: string[];
|
|
4
|
+
onError?: (err: unknown) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useOctopusRenderer(video: HTMLVideoElement): {
|
|
7
|
+
attach: (options: OctopusTrackOptions) => Promise<boolean>;
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
isAttached: () => boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
2
|
+
import type { Subtitle } from '../../../../model';
|
|
3
|
+
export declare type SubtitleRenderMode = "none" | "vtt" | "ass-octopus";
|
|
4
|
+
export declare function useSubtitleRenderEngine(player: LzcPlayer): {
|
|
5
|
+
mode: import("vue").Ref<SubtitleRenderMode, SubtitleRenderMode>;
|
|
6
|
+
selectMode: (subtitle: Subtitle | undefined, hidden: boolean) => Promise<SubtitleRenderMode>;
|
|
7
|
+
dispose: () => void;
|
|
8
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { VideoInfo, VideoQualityLevel, VideoResolution } from '../../../model';
|
|
2
2
|
import type { Subtitle } from '../../../model';
|
|
3
3
|
import type { LzcPlayer } from "../player";
|
|
4
|
-
/**
|
|
4
|
+
/** Stub compatible with videojs-contrib-quality-levels. */
|
|
5
5
|
export declare function createStubQualityLevels(): {
|
|
6
6
|
levels_: {
|
|
7
7
|
id: string;
|
|
@@ -20,7 +20,7 @@ export interface NativePlayerOptions {
|
|
|
20
20
|
mediaPrefix?: string;
|
|
21
21
|
showTopBar?: boolean;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
23
|
+
/** Public API type consumed by provide/inject and composables. */
|
|
24
24
|
export interface NativePlayerAPI extends LzcPlayer {
|
|
25
25
|
options_: NativePlayerOptions & {
|
|
26
26
|
mediaPrefix: string;
|
|
@@ -57,7 +57,10 @@ export declare class NativePlayer implements NativePlayerAPI, LzcPlayer {
|
|
|
57
57
|
mediaPrefix: string;
|
|
58
58
|
};
|
|
59
59
|
private _qualityLevels;
|
|
60
|
-
|
|
60
|
+
private _iosFakeFullscreen;
|
|
61
|
+
private _iosFakeFullscreenCleanupTimer;
|
|
62
|
+
private _onViewportChange;
|
|
63
|
+
/** useSource may replace this with src2; keep original setSrc internally. */
|
|
61
64
|
_src: (sources?: string | {
|
|
62
65
|
src: string;
|
|
63
66
|
type?: string;
|
|
@@ -65,19 +68,19 @@ export declare class NativePlayer implements NativePlayerAPI, LzcPlayer {
|
|
|
65
68
|
src: string;
|
|
66
69
|
type?: string;
|
|
67
70
|
}>) => string | void;
|
|
68
|
-
/**
|
|
71
|
+
/** Optional callbacks for previous/next episode. */
|
|
69
72
|
playPrev?: () => void;
|
|
70
73
|
playNext?: () => void;
|
|
71
|
-
/**
|
|
74
|
+
/** Optional modal bridge injected by player component. */
|
|
72
75
|
lzcModal?: () => {
|
|
73
76
|
openModal: (page: string) => void;
|
|
74
77
|
close: () => void;
|
|
75
78
|
};
|
|
76
|
-
/** useSource
|
|
79
|
+
/** Called by useSource via player.qualityLevels(). */
|
|
77
80
|
qualityLevels(): StubQualityLevels;
|
|
78
|
-
/**
|
|
81
|
+
/** Exposed for controls: whether previous is available. */
|
|
79
82
|
get prevEnabled(): boolean;
|
|
80
|
-
/**
|
|
83
|
+
/** Exposed for controls: whether next is available. */
|
|
81
84
|
get nextEnabled(): boolean;
|
|
82
85
|
private _onDocumentFullscreenChange;
|
|
83
86
|
constructor(videoEl: HTMLVideoElement, options?: NativePlayerOptions);
|
|
@@ -118,11 +121,12 @@ export declare class NativePlayer implements NativePlayerAPI, LzcPlayer {
|
|
|
118
121
|
id(): string;
|
|
119
122
|
isDisposed(): boolean;
|
|
120
123
|
dispose(): void;
|
|
121
|
-
/**
|
|
124
|
+
/** Patched by useSource. */
|
|
122
125
|
currentVideoInfo(): VideoInfo | null;
|
|
123
126
|
currentVideoName(): string;
|
|
124
127
|
currentPreview(): undefined;
|
|
125
128
|
getAvaliableSubtitles(): Subtitle[] | undefined;
|
|
129
|
+
isSubtitleLoading(): boolean;
|
|
126
130
|
currentSubtitle(): Subtitle | undefined;
|
|
127
131
|
changeSubtitle(_sub: Subtitle | number): void;
|
|
128
132
|
clearSubtitle(): void;
|
|
@@ -144,14 +148,25 @@ export declare class NativePlayer implements NativePlayerAPI, LzcPlayer {
|
|
|
144
148
|
playbackRates(rates?: number[]): number[];
|
|
145
149
|
setFullscreenTarget(el: HTMLElement | null): void;
|
|
146
150
|
setContainer(el: HTMLElement | null): void;
|
|
151
|
+
private _fullscreenElement;
|
|
152
|
+
private _readViewportSize;
|
|
153
|
+
private _syncIosFakeFullscreenLayout;
|
|
154
|
+
private _clearIosFakeFullscreenLayout;
|
|
155
|
+
private _clearIosFakeFullscreenCleanupTimer;
|
|
156
|
+
private _prefersReducedMotion;
|
|
157
|
+
private _animateIosFakeFullscreenExit;
|
|
158
|
+
private _bindIosFakeFullscreenListeners;
|
|
159
|
+
private _unbindIosFakeFullscreenListeners;
|
|
160
|
+
private _setIosFakeFullscreen;
|
|
147
161
|
private _isIosSafari;
|
|
148
162
|
requestFullscreen(): void;
|
|
149
163
|
exitFullscreen(): void;
|
|
150
164
|
isFullscreen(): boolean;
|
|
151
|
-
|
|
165
|
+
isUsingNativeSubtitleFallback(): boolean;
|
|
166
|
+
/** Set by useSource hooks. */
|
|
152
167
|
setCurrentVideoInfo(info: VideoInfo | null): void;
|
|
153
168
|
setVideoDisplayName(name: string): void;
|
|
154
|
-
/**
|
|
169
|
+
/** Expose internal video element for useSource bindings. */
|
|
155
170
|
$video(): HTMLVideoElement;
|
|
156
171
|
networkState(): number;
|
|
157
172
|
currentSource(): {
|
|
@@ -5,6 +5,6 @@ export declare function useNativePlayerFullscreen(player: Ref<NativePlayerAPI |
|
|
|
5
5
|
}): {
|
|
6
6
|
showTopBar: Ref<boolean, boolean>;
|
|
7
7
|
onFullscreenChange: () => void;
|
|
8
|
-
bind: (
|
|
8
|
+
bind: (p: NativePlayerAPI) => void;
|
|
9
9
|
unbindIfNeeded: () => void;
|
|
10
10
|
};
|
|
@@ -44,12 +44,14 @@ export interface LzcPlayer {
|
|
|
44
44
|
currentResolution(): VideoResolution | undefined;
|
|
45
45
|
changeResolution(level: VideoQualityLevel): void;
|
|
46
46
|
getAvaliableSubtitles(): Subtitle[] | undefined;
|
|
47
|
+
isSubtitleLoading(): boolean;
|
|
47
48
|
currentSubtitle(): Subtitle | undefined;
|
|
48
49
|
changeSubtitle(sub: Subtitle | number): void;
|
|
49
50
|
clearSubtitle(): void;
|
|
50
51
|
toggleSubtitleVisibility(): void;
|
|
51
52
|
isSubtitleHidden(): boolean;
|
|
52
53
|
setSubtitleHidden(value: boolean): void;
|
|
54
|
+
isUsingNativeSubtitleFallback?(): boolean;
|
|
53
55
|
currentBrightness(): Promise<number>;
|
|
54
56
|
isCastMode(): boolean;
|
|
55
57
|
isNetdiskSource(): boolean;
|
package/dist/src/model.d.ts
CHANGED
|
@@ -33,7 +33,13 @@ export interface Subtitle {
|
|
|
33
33
|
codec_name: string;
|
|
34
34
|
is_external: boolean;
|
|
35
35
|
path: string;
|
|
36
|
-
|
|
36
|
+
vtt_url?: string;
|
|
37
|
+
track_id?: string;
|
|
38
|
+
ass_url?: string;
|
|
39
|
+
ass_fonts?: string[];
|
|
40
|
+
ass_renderable?: boolean;
|
|
41
|
+
ass_unavailable_reason?: string;
|
|
42
|
+
/** From subtitle-info API, whether this is the default subtitle track. */
|
|
37
43
|
default?: boolean;
|
|
38
44
|
}
|
|
39
45
|
export interface VideoInfo extends Doc {
|
|
@@ -41,6 +41,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
41
41
|
codec_name: string;
|
|
42
42
|
is_external: boolean;
|
|
43
43
|
path: string;
|
|
44
|
+
vtt_url?: string | undefined;
|
|
45
|
+
track_id?: string | undefined;
|
|
46
|
+
ass_url?: string | undefined;
|
|
47
|
+
ass_fonts?: string[] | undefined;
|
|
48
|
+
ass_renderable?: boolean | undefined;
|
|
49
|
+
ass_unavailable_reason?: string | undefined;
|
|
44
50
|
default?: boolean | undefined;
|
|
45
51
|
}[] | undefined;
|
|
46
52
|
beforeHiddenSubtitle?: {
|
|
@@ -50,6 +56,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
50
56
|
codec_name: string;
|
|
51
57
|
is_external: boolean;
|
|
52
58
|
path: string;
|
|
59
|
+
vtt_url?: string | undefined;
|
|
60
|
+
track_id?: string | undefined;
|
|
61
|
+
ass_url?: string | undefined;
|
|
62
|
+
ass_fonts?: string[] | undefined;
|
|
63
|
+
ass_renderable?: boolean | undefined;
|
|
64
|
+
ass_unavailable_reason?: string | undefined;
|
|
53
65
|
default?: boolean | undefined;
|
|
54
66
|
} | undefined;
|
|
55
67
|
requestHistory?: boolean | undefined;
|
|
@@ -77,6 +89,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
77
89
|
codec_name: string;
|
|
78
90
|
is_external: boolean;
|
|
79
91
|
path: string;
|
|
92
|
+
vtt_url?: string | undefined;
|
|
93
|
+
track_id?: string | undefined;
|
|
94
|
+
ass_url?: string | undefined;
|
|
95
|
+
ass_fonts?: string[] | undefined;
|
|
96
|
+
ass_renderable?: boolean | undefined;
|
|
97
|
+
ass_unavailable_reason?: string | undefined;
|
|
80
98
|
default?: boolean | undefined;
|
|
81
99
|
}[] | undefined;
|
|
82
100
|
beforeHiddenSubtitle?: {
|
|
@@ -86,6 +104,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
86
104
|
codec_name: string;
|
|
87
105
|
is_external: boolean;
|
|
88
106
|
path: string;
|
|
107
|
+
vtt_url?: string | undefined;
|
|
108
|
+
track_id?: string | undefined;
|
|
109
|
+
ass_url?: string | undefined;
|
|
110
|
+
ass_fonts?: string[] | undefined;
|
|
111
|
+
ass_renderable?: boolean | undefined;
|
|
112
|
+
ass_unavailable_reason?: string | undefined;
|
|
89
113
|
default?: boolean | undefined;
|
|
90
114
|
} | undefined;
|
|
91
115
|
requestHistory?: boolean | undefined;
|
|
@@ -113,6 +137,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
113
137
|
codec_name: string;
|
|
114
138
|
is_external: boolean;
|
|
115
139
|
path: string;
|
|
140
|
+
vtt_url?: string | undefined;
|
|
141
|
+
track_id?: string | undefined;
|
|
142
|
+
ass_url?: string | undefined;
|
|
143
|
+
ass_fonts?: string[] | undefined;
|
|
144
|
+
ass_renderable?: boolean | undefined;
|
|
145
|
+
ass_unavailable_reason?: string | undefined;
|
|
116
146
|
default?: boolean | undefined;
|
|
117
147
|
}[] | undefined;
|
|
118
148
|
beforeHiddenSubtitle?: {
|
|
@@ -122,6 +152,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
122
152
|
codec_name: string;
|
|
123
153
|
is_external: boolean;
|
|
124
154
|
path: string;
|
|
155
|
+
vtt_url?: string | undefined;
|
|
156
|
+
track_id?: string | undefined;
|
|
157
|
+
ass_url?: string | undefined;
|
|
158
|
+
ass_fonts?: string[] | undefined;
|
|
159
|
+
ass_renderable?: boolean | undefined;
|
|
160
|
+
ass_unavailable_reason?: string | undefined;
|
|
125
161
|
default?: boolean | undefined;
|
|
126
162
|
} | undefined;
|
|
127
163
|
requestHistory?: boolean | undefined;
|
|
@@ -161,6 +197,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
161
197
|
codec_name: string;
|
|
162
198
|
is_external: boolean;
|
|
163
199
|
path: string;
|
|
200
|
+
vtt_url?: string | undefined;
|
|
201
|
+
track_id?: string | undefined;
|
|
202
|
+
ass_url?: string | undefined;
|
|
203
|
+
ass_fonts?: string[] | undefined;
|
|
204
|
+
ass_renderable?: boolean | undefined;
|
|
205
|
+
ass_unavailable_reason?: string | undefined;
|
|
164
206
|
default?: boolean | undefined;
|
|
165
207
|
}[] | undefined;
|
|
166
208
|
beforeHiddenSubtitle?: {
|
|
@@ -170,6 +212,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
170
212
|
codec_name: string;
|
|
171
213
|
is_external: boolean;
|
|
172
214
|
path: string;
|
|
215
|
+
vtt_url?: string | undefined;
|
|
216
|
+
track_id?: string | undefined;
|
|
217
|
+
ass_url?: string | undefined;
|
|
218
|
+
ass_fonts?: string[] | undefined;
|
|
219
|
+
ass_renderable?: boolean | undefined;
|
|
220
|
+
ass_unavailable_reason?: string | undefined;
|
|
173
221
|
default?: boolean | undefined;
|
|
174
222
|
} | undefined;
|
|
175
223
|
requestHistory?: boolean | undefined;
|
|
@@ -197,6 +245,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
197
245
|
codec_name: string;
|
|
198
246
|
is_external: boolean;
|
|
199
247
|
path: string;
|
|
248
|
+
vtt_url?: string | undefined;
|
|
249
|
+
track_id?: string | undefined;
|
|
250
|
+
ass_url?: string | undefined;
|
|
251
|
+
ass_fonts?: string[] | undefined;
|
|
252
|
+
ass_renderable?: boolean | undefined;
|
|
253
|
+
ass_unavailable_reason?: string | undefined;
|
|
200
254
|
default?: boolean | undefined;
|
|
201
255
|
}[] | undefined;
|
|
202
256
|
beforeHiddenSubtitle?: {
|
|
@@ -206,6 +260,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
206
260
|
codec_name: string;
|
|
207
261
|
is_external: boolean;
|
|
208
262
|
path: string;
|
|
263
|
+
vtt_url?: string | undefined;
|
|
264
|
+
track_id?: string | undefined;
|
|
265
|
+
ass_url?: string | undefined;
|
|
266
|
+
ass_fonts?: string[] | undefined;
|
|
267
|
+
ass_renderable?: boolean | undefined;
|
|
268
|
+
ass_unavailable_reason?: string | undefined;
|
|
209
269
|
default?: boolean | undefined;
|
|
210
270
|
} | undefined;
|
|
211
271
|
requestHistory?: boolean | undefined;
|
|
@@ -233,6 +293,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
233
293
|
codec_name: string;
|
|
234
294
|
is_external: boolean;
|
|
235
295
|
path: string;
|
|
296
|
+
vtt_url?: string | undefined;
|
|
297
|
+
track_id?: string | undefined;
|
|
298
|
+
ass_url?: string | undefined;
|
|
299
|
+
ass_fonts?: string[] | undefined;
|
|
300
|
+
ass_renderable?: boolean | undefined;
|
|
301
|
+
ass_unavailable_reason?: string | undefined;
|
|
236
302
|
default?: boolean | undefined;
|
|
237
303
|
}[] | undefined;
|
|
238
304
|
beforeHiddenSubtitle?: {
|
|
@@ -242,6 +308,12 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
242
308
|
codec_name: string;
|
|
243
309
|
is_external: boolean;
|
|
244
310
|
path: string;
|
|
311
|
+
vtt_url?: string | undefined;
|
|
312
|
+
track_id?: string | undefined;
|
|
313
|
+
ass_url?: string | undefined;
|
|
314
|
+
ass_fonts?: string[] | undefined;
|
|
315
|
+
ass_renderable?: boolean | undefined;
|
|
316
|
+
ass_unavailable_reason?: string | undefined;
|
|
245
317
|
default?: boolean | undefined;
|
|
246
318
|
} | undefined;
|
|
247
319
|
requestHistory?: boolean | undefined;
|