@lazycatcloud/lzc-video-player 1.1.1 → 1.2.1
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 +48 -48
- package/dist/{browser-ponyfill.9fe1939a.js → browser-ponyfill.e29f9cb8.js} +1 -1
- package/dist/{lzc-video-player.7a1118d5.js → lzc-video-player.6c755f5f.js} +16056 -15969
- package/dist/lzc-video-player.js +2 -2
- package/dist/src/components/Dialog/index.vue.d.ts +24 -24
- package/dist/src/components/MultipleEdit/choose.vue.d.ts +20 -20
- package/dist/src/components/PlayList/index.vue.d.ts +26 -26
- package/dist/src/components/Spectrum/index.vue.d.ts +2 -2
- package/dist/src/components/Video/NativeVideoPlayer.vue.d.ts +79 -78
- package/dist/src/components/Video/components/LzcModal/components/simpleList.vue.d.ts +36 -36
- package/dist/src/components/Video/components/LzcModal/list.vue.d.ts +13 -13
- package/dist/src/components/Video/components/LzcModal/playrate.vue.d.ts +13 -13
- package/dist/src/components/Video/components/LzcModal/resolution.vue.d.ts +13 -13
- package/dist/src/components/Video/components/LzcModal/subtitle.vue.d.ts +13 -13
- package/dist/src/components/Video/components/LzcModal/useModal.d.ts +14 -14
- package/dist/src/components/Video/components/LzcOverlay/SubtitleLayer.vue.d.ts +19 -19
- package/dist/src/components/Video/components/LzcOverlay/cast.vue.d.ts +23 -23
- package/dist/src/components/Video/components/LzcOverlay/casting.vue.d.ts +13 -13
- package/dist/src/components/Video/components/LzcOverlay/error.vue.d.ts +13 -13
- package/dist/src/components/Video/components/LzcOverlay/helper.d.ts +26 -26
- package/dist/src/components/Video/components/LzcOverlay/index.vue.d.ts +25 -19
- package/dist/src/components/Video/components/LzcOverlay/playing.vue.d.ts +25 -19
- package/dist/src/components/Video/components/LzcOverlay/playingButtons.vue.d.ts +19 -13
- package/dist/src/components/Video/components/LzcOverlay/playingLayout.vue.d.ts +32 -26
- package/dist/src/components/Video/components/LzcOverlay/useCast.d.ts +16 -16
- package/dist/src/components/Video/components/LzcOverlay/useCommon.d.ts +5 -5
- package/dist/src/components/Video/components/LzcOverlay/useOctopusRenderer.d.ts +11 -11
- package/dist/src/components/Video/components/LzcOverlay/useSubtitleRenderEngine.d.ts +9 -9
- package/dist/src/components/Video/components/LzcOverlay/useSubtitleTrack.d.ts +7 -7
- package/dist/src/components/Video/components/useLzcCommon.d.ts +2 -2
- package/dist/src/components/Video/directPlay.d.ts +43 -43
- package/dist/src/components/Video/getSubtitleInfo.d.ts +2 -2
- package/dist/src/components/Video/native/EventEmitter.d.ts +22 -22
- package/dist/src/components/Video/native/NativeControls.vue.d.ts +117 -90
- package/dist/src/components/Video/native/NativeModal.vue.d.ts +44 -38
- package/dist/src/components/Video/native/NativePlayer.d.ts +198 -197
- package/dist/src/components/Video/native/NativePlayer.vue.d.ts +27 -27
- package/dist/src/components/Video/native/index.d.ts +3 -3
- package/dist/src/components/Video/native/playerKey.d.ts +3 -3
- package/dist/src/components/Video/native/useNativeCastMiddleware.d.ts +2 -2
- package/dist/src/components/Video/native/useNativePlayer.d.ts +2 -2
- package/dist/src/components/Video/native/useNativePlayerFullscreen.d.ts +10 -10
- package/dist/src/components/Video/native/useNativePlayerHistory.d.ts +9 -9
- package/dist/src/components/Video/native/useNativePlayerModal.d.ts +17 -17
- package/dist/src/components/Video/native/useNativePlayerPlaylist.d.ts +9 -9
- package/dist/src/components/Video/native/useNativePlayerState.d.ts +16 -16
- package/dist/src/components/Video/player.d.ts +99 -98
- package/dist/src/components/Video/useSource.d.ts +14 -14
- package/dist/src/components/Video/useSubtitlePreference.d.ts +11 -11
- package/dist/src/components/Video/useWebview.d.ts +7 -7
- package/dist/src/components/Video/videoFrame.d.ts +2 -2
- package/dist/src/i18n/index.d.ts +10 -10
- package/dist/src/lzc-video-player.d.ts +4 -6
- package/dist/src/model.d.ts +63 -63
- package/dist/src/stores/pinia.d.ts +2 -2
- package/dist/src/stores/playlist.d.ts +361 -361
- package/dist/src/use/useKeyBind.d.ts +3 -3
- package/dist/src/use/useMultipleEdit.d.ts +9 -9
- package/dist/src/use/useSdk.d.ts +5 -5
- package/dist/src/use/useSubtitle.d.ts +23 -23
- package/dist/src/use/useUtils.d.ts +3 -3
- package/dist/src/use/useVideoFrame.d.ts +5 -5
- package/package.json +22 -22
|
@@ -1,13 +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;
|
|
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;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type { TouchSwipeParams } from "quasar";
|
|
2
|
-
export interface TouchPanEvent extends TouchSwipeParams {
|
|
3
|
-
isFirst: boolean;
|
|
4
|
-
isFinal: boolean;
|
|
5
|
-
offset: {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
};
|
|
9
|
-
delta: {
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
};
|
|
13
|
-
position: {
|
|
14
|
-
top: number;
|
|
15
|
-
left: number;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare const computeBrightness: (currBrightness: number, event: TouchPanEvent, dim: any) => {
|
|
19
|
-
percent: number;
|
|
20
|
-
brightness: number;
|
|
21
|
-
};
|
|
22
|
-
export declare const computeVolume: (currentVolume: number, event: TouchPanEvent, dim: any) => {
|
|
23
|
-
percent: number;
|
|
24
|
-
volume: number;
|
|
25
|
-
};
|
|
26
|
-
export declare const computeProgress: (total: number, currentTime: number, event: TouchPanEvent, dim: any) => number;
|
|
1
|
+
import type { TouchSwipeParams } from "quasar";
|
|
2
|
+
export interface TouchPanEvent extends TouchSwipeParams {
|
|
3
|
+
isFirst: boolean;
|
|
4
|
+
isFinal: boolean;
|
|
5
|
+
offset: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
delta: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
position: {
|
|
14
|
+
top: number;
|
|
15
|
+
left: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const computeBrightness: (currBrightness: number, event: TouchPanEvent, dim: any) => {
|
|
19
|
+
percent: number;
|
|
20
|
+
brightness: number;
|
|
21
|
+
};
|
|
22
|
+
export declare const computeVolume: (currentVolume: number, event: TouchPanEvent, dim: any) => {
|
|
23
|
+
percent: number;
|
|
24
|
+
volume: number;
|
|
25
|
+
};
|
|
26
|
+
export declare const computeProgress: (total: number, currentTime: number, event: TouchPanEvent, dim: any) => number;
|
|
@@ -1,19 +1,25 @@
|
|
|
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
|
-
active: {
|
|
8
|
-
type: import("vue").PropType<boolean>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
active: {
|
|
8
|
+
type: import("vue").PropType<boolean>;
|
|
9
|
+
};
|
|
10
|
+
directMode: {
|
|
11
|
+
type: import("vue").PropType<boolean>;
|
|
12
|
+
};
|
|
13
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
player: {
|
|
15
|
+
type: import("vue").PropType<LzcPlayer>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
active: {
|
|
19
|
+
type: import("vue").PropType<boolean>;
|
|
20
|
+
};
|
|
21
|
+
directMode: {
|
|
22
|
+
type: import("vue").PropType<boolean>;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -1,19 +1,25 @@
|
|
|
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
|
-
active: {
|
|
8
|
-
type: import("vue").PropType<boolean>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
active: {
|
|
8
|
+
type: import("vue").PropType<boolean>;
|
|
9
|
+
};
|
|
10
|
+
directMode: {
|
|
11
|
+
type: import("vue").PropType<boolean>;
|
|
12
|
+
};
|
|
13
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
player: {
|
|
15
|
+
type: import("vue").PropType<LzcPlayer>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
active: {
|
|
19
|
+
type: import("vue").PropType<boolean>;
|
|
20
|
+
};
|
|
21
|
+
directMode: {
|
|
22
|
+
type: import("vue").PropType<boolean>;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -1,13 +1,19 @@
|
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
directMode: {
|
|
8
|
+
type: import("vue").PropType<boolean>;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
player: {
|
|
12
|
+
type: import("vue").PropType<LzcPlayer>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
directMode: {
|
|
16
|
+
type: import("vue").PropType<boolean>;
|
|
17
|
+
};
|
|
18
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
-
player: {
|
|
4
|
-
type: import("vue").PropType<LzcPlayer>;
|
|
5
|
-
required: true;
|
|
6
|
-
};
|
|
7
|
-
active: {
|
|
8
|
-
type: import("vue").PropType<boolean>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
}
|
|
1
|
+
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
player: {
|
|
4
|
+
type: import("vue").PropType<LzcPlayer>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
active: {
|
|
8
|
+
type: import("vue").PropType<boolean>;
|
|
9
|
+
};
|
|
10
|
+
directMode: {
|
|
11
|
+
type: import("vue").PropType<boolean>;
|
|
12
|
+
};
|
|
13
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
player: {
|
|
15
|
+
type: import("vue").PropType<LzcPlayer>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
active: {
|
|
19
|
+
type: import("vue").PropType<boolean>;
|
|
20
|
+
};
|
|
21
|
+
directMode: {
|
|
22
|
+
type: import("vue").PropType<boolean>;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
25
|
+
default?(_: {}): any;
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
|
28
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { type Ref } from "vue";
|
|
2
|
-
import type { Subscription } from "rxjs";
|
|
3
|
-
import { type RemoteMediaPlayer } from "@lazycatcloud/sdk/dist/dlna/dlna";
|
|
4
|
-
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
5
|
-
export declare const devices: Ref<RemoteMediaPlayer[]>;
|
|
6
|
-
export declare const castSubscribe: Ref<Subscription | null>;
|
|
7
|
-
export declare const castDevice: Ref<RemoteMediaPlayer | null>;
|
|
8
|
-
export declare const castLoading: Ref<boolean>;
|
|
9
|
-
export declare function useRefresh(): void;
|
|
10
|
-
export declare function detachCastSession(): void;
|
|
11
|
-
export declare function doPlayAction(player: LzcPlayer, mediaFile: string): Promise<void>;
|
|
12
|
-
export declare function doPauseAction(): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
13
|
-
export declare function doContinueAction(): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
14
|
-
export declare function doStopAction(): Promise<void>;
|
|
15
|
-
export declare function doSeekAction(time: number): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
16
|
-
export declare function doPlayNextAction(player: LzcPlayer, mediaFile: string): Promise<void>;
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import type { Subscription } from "rxjs";
|
|
3
|
+
import { type RemoteMediaPlayer } from "@lazycatcloud/sdk/dist/dlna/dlna";
|
|
4
|
+
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
5
|
+
export declare const devices: Ref<RemoteMediaPlayer[]>;
|
|
6
|
+
export declare const castSubscribe: Ref<Subscription | null>;
|
|
7
|
+
export declare const castDevice: Ref<RemoteMediaPlayer | null>;
|
|
8
|
+
export declare const castLoading: Ref<boolean>;
|
|
9
|
+
export declare function useRefresh(): void;
|
|
10
|
+
export declare function detachCastSession(): void;
|
|
11
|
+
export declare function doPlayAction(player: LzcPlayer, mediaFile: string): Promise<void>;
|
|
12
|
+
export declare function doPauseAction(): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
13
|
+
export declare function doContinueAction(): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
14
|
+
export declare function doStopAction(): Promise<void>;
|
|
15
|
+
export declare function doSeekAction(time: number): Promise<import("@lazycatcloud/sdk/dist/google/protobuf/empty").Empty>;
|
|
16
|
+
export declare function doPlayNextAction(player: LzcPlayer, mediaFile: string): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
2
|
-
export declare const useVideoName: (player: LzcPlayer) => {
|
|
3
|
-
videoName: import("vue").Ref<string, string>;
|
|
4
|
-
};
|
|
5
|
-
export declare function parseSecond(t: string | number): number;
|
|
1
|
+
import type { LzcPlayer } from '../../../../components/Video/player';
|
|
2
|
+
export declare const useVideoName: (player: LzcPlayer) => {
|
|
3
|
+
videoName: import("vue").Ref<string, string>;
|
|
4
|
+
};
|
|
5
|
+
export declare function parseSecond(t: string | number): number;
|
|
@@ -1,11 +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
|
-
};
|
|
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
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
reset: () => void;
|
|
7
|
-
selectMode: (subtitle: Subtitle | undefined, hidden: boolean) => Promise<SubtitleRenderMode>;
|
|
8
|
-
dispose: () => void;
|
|
9
|
-
};
|
|
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
|
+
reset: () => void;
|
|
7
|
+
selectMode: (subtitle: Subtitle | undefined, hidden: boolean) => Promise<SubtitleRenderMode>;
|
|
8
|
+
dispose: () => void;
|
|
9
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface SubtitleCue {
|
|
2
|
-
start: number;
|
|
3
|
-
end: number;
|
|
4
|
-
text: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function parseWebVtt(content: string): SubtitleCue[];
|
|
7
|
-
export declare function fetchSubtitleCues(url: string): Promise<SubtitleCue[]>;
|
|
1
|
+
export interface SubtitleCue {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function parseWebVtt(content: string): SubtitleCue[];
|
|
7
|
+
export declare function fetchSubtitleCues(url: string): Promise<SubtitleCue[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function formatTime(second: number): string;
|
|
2
|
-
export declare function remHeight(rem: number, pixelRatio?: false): number;
|
|
1
|
+
export declare function formatTime(second: number): string;
|
|
2
|
+
export declare function remHeight(rem: number, pixelRatio?: false): number;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { VideoInfo, VideoQualityLevel } from '../../model';
|
|
2
|
-
export interface DirectPlayProfile {
|
|
3
|
-
Container: string;
|
|
4
|
-
Type: string;
|
|
5
|
-
VideoCodec?: string;
|
|
6
|
-
AudioCodec?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface CodecProfileCondition {
|
|
9
|
-
Condition: string;
|
|
10
|
-
Property: string;
|
|
11
|
-
Value: string;
|
|
12
|
-
}
|
|
13
|
-
export interface CodecProfile {
|
|
14
|
-
Type: string;
|
|
15
|
-
Codec?: string;
|
|
16
|
-
Conditions?: CodecProfileCondition[];
|
|
17
|
-
}
|
|
18
|
-
export interface DeviceProfile {
|
|
19
|
-
Name: string;
|
|
20
|
-
DirectPlayProfiles: DirectPlayProfile[];
|
|
21
|
-
CodecProfiles: CodecProfile[];
|
|
22
|
-
MaxStreamingBitrate?: number;
|
|
23
|
-
MaxStaticBitrate?: number;
|
|
24
|
-
}
|
|
25
|
-
export interface OriginPlaybackDecision {
|
|
26
|
-
originMode: "direct" | "hls";
|
|
27
|
-
originDirectUrl: string;
|
|
28
|
-
originHlsUrl: string;
|
|
29
|
-
subtitleInfoUrl: string;
|
|
30
|
-
reasons: string[];
|
|
31
|
-
mediaSource: {
|
|
32
|
-
container?: string;
|
|
33
|
-
videoCodec?: string;
|
|
34
|
-
audioCodec?: string;
|
|
35
|
-
bitrate?: number;
|
|
36
|
-
width?: number;
|
|
37
|
-
height?: number;
|
|
38
|
-
fps?: number;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export declare function buildDeviceProfile(): DeviceProfile;
|
|
42
|
-
export declare function fetchOriginPlaybackDecision(info: VideoInfo, mediaPrefix?: string): Promise<OriginPlaybackDecision | undefined>;
|
|
43
|
-
export declare function fetchOriginHlsLevels(masterUrl: string): Promise<VideoQualityLevel[]>;
|
|
1
|
+
import type { VideoInfo, VideoQualityLevel } from '../../model';
|
|
2
|
+
export interface DirectPlayProfile {
|
|
3
|
+
Container: string;
|
|
4
|
+
Type: string;
|
|
5
|
+
VideoCodec?: string;
|
|
6
|
+
AudioCodec?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CodecProfileCondition {
|
|
9
|
+
Condition: string;
|
|
10
|
+
Property: string;
|
|
11
|
+
Value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CodecProfile {
|
|
14
|
+
Type: string;
|
|
15
|
+
Codec?: string;
|
|
16
|
+
Conditions?: CodecProfileCondition[];
|
|
17
|
+
}
|
|
18
|
+
export interface DeviceProfile {
|
|
19
|
+
Name: string;
|
|
20
|
+
DirectPlayProfiles: DirectPlayProfile[];
|
|
21
|
+
CodecProfiles: CodecProfile[];
|
|
22
|
+
MaxStreamingBitrate?: number;
|
|
23
|
+
MaxStaticBitrate?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface OriginPlaybackDecision {
|
|
26
|
+
originMode: "direct" | "hls";
|
|
27
|
+
originDirectUrl: string;
|
|
28
|
+
originHlsUrl: string;
|
|
29
|
+
subtitleInfoUrl: string;
|
|
30
|
+
reasons: string[];
|
|
31
|
+
mediaSource: {
|
|
32
|
+
container?: string;
|
|
33
|
+
videoCodec?: string;
|
|
34
|
+
audioCodec?: string;
|
|
35
|
+
bitrate?: number;
|
|
36
|
+
width?: number;
|
|
37
|
+
height?: number;
|
|
38
|
+
fps?: number;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export declare function buildDeviceProfile(): DeviceProfile;
|
|
42
|
+
export declare function fetchOriginPlaybackDecision(info: VideoInfo, mediaPrefix?: string): Promise<OriginPlaybackDecision | undefined>;
|
|
43
|
+
export declare function fetchOriginHlsLevels(masterUrl: string): Promise<VideoQualityLevel[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Subtitle } from '../../model';
|
|
2
|
-
export declare function getSubtitleInfo(videoPath?: string): Promise<Subtitle[] | undefined>;
|
|
1
|
+
import type { Subtitle } from '../../model';
|
|
2
|
+
export declare function getSubtitleInfo(videoPath?: string): Promise<Subtitle[] | undefined>;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 简单事件发射器,用于 NativePlayer 与 useSource 等对接
|
|
3
|
-
*/
|
|
4
|
-
declare type Listener = (e?: any) => void;
|
|
5
|
-
export declare class EventEmitter {
|
|
6
|
-
private listeners;
|
|
7
|
-
private oneListeners;
|
|
8
|
-
on(event: string, fn: Listener): void;
|
|
9
|
-
one(event: string, fn: Listener): void;
|
|
10
|
-
off(event: string, fn?: Listener): void;
|
|
11
|
-
/**
|
|
12
|
-
* 支持两种用法:
|
|
13
|
-
* - trigger("eventName") 或 trigger("eventName", data)
|
|
14
|
-
* - trigger({ type: "eventName", ...data }) 与 video.js 兼容
|
|
15
|
-
*/
|
|
16
|
-
trigger(eventOrName: string | {
|
|
17
|
-
type: string;
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}, data?: unknown): void;
|
|
20
|
-
dispose(): void;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* 简单事件发射器,用于 NativePlayer 与 useSource 等对接
|
|
3
|
+
*/
|
|
4
|
+
declare type Listener = (e?: any) => void;
|
|
5
|
+
export declare class EventEmitter {
|
|
6
|
+
private listeners;
|
|
7
|
+
private oneListeners;
|
|
8
|
+
on(event: string, fn: Listener): void;
|
|
9
|
+
one(event: string, fn: Listener): void;
|
|
10
|
+
off(event: string, fn?: Listener): void;
|
|
11
|
+
/**
|
|
12
|
+
* 支持两种用法:
|
|
13
|
+
* - trigger("eventName") 或 trigger("eventName", data)
|
|
14
|
+
* - trigger({ type: "eventName", ...data }) 与 video.js 兼容
|
|
15
|
+
*/
|
|
16
|
+
trigger(eventOrName: string | {
|
|
17
|
+
type: string;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}, data?: unknown): void;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|