@vocalstack/player 0.1.0-alpha.5 → 0.1.0-alpha.51
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 +12 -0
- package/dist/core/embeds.d.ts +26 -0
- package/dist/core/loomStream.d.ts +4 -0
- package/dist/core/sites.d.ts +13 -0
- package/dist/core/voiceWait.d.ts +10 -0
- package/dist/data/connect.d.ts +5 -3
- package/dist/data/errors.d.ts +1 -0
- package/dist/data/title.d.ts +8 -0
- package/dist/ds/Controls.d.ts +2 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4351 -3404
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/ui/EmbedFollow.d.ts +8 -0
- package/dist/ui/FacebookFollow.d.ts +7 -0
- package/dist/ui/FileFollow.d.ts +10 -0
- package/dist/ui/IdleSettings.d.ts +17 -0
- package/dist/ui/Providers.d.ts +1 -0
- package/dist/ui/SiteIcon.d.ts +9 -0
- package/dist/ui/SourceGate.d.ts +22 -2
- package/dist/ui/VocalStackPlayer.d.ts +22 -1
- package/dist/ui/WistiaFollow.d.ts +7 -0
- package/dist/ui/core.d.ts +4 -1
- package/dist/ui/full.d.ts +3 -1
- package/package.json +3 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type FollowSetup = (v: HTMLVideoElement, fail: () => void) => (() => void) | void;
|
|
2
|
+
export declare function FileFollow({ src, setup, t, playing, seekN, onToggle, seekOver }: {
|
|
3
|
+
src?: string;
|
|
4
|
+
setup?: FollowSetup;
|
|
5
|
+
t: number;
|
|
6
|
+
playing: boolean;
|
|
7
|
+
seekN: number;
|
|
8
|
+
onToggle?: () => void;
|
|
9
|
+
seekOver?: number;
|
|
10
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IdlePrefs {
|
|
2
|
+
lang: string | null;
|
|
3
|
+
subtitles: boolean;
|
|
4
|
+
speakerLabels: boolean;
|
|
5
|
+
wordHighlight: boolean;
|
|
6
|
+
translateAudio: boolean;
|
|
7
|
+
voices: 'cloned' | 'synthetic';
|
|
8
|
+
removeBackground: boolean;
|
|
9
|
+
muted: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const IDLE_DEFAULTS: IdlePrefs;
|
|
12
|
+
export declare function useIdleControls(prefs: IdlePrefs, set: (p: Partial<IdlePrefs>) => void): {
|
|
13
|
+
chip: import("react").JSX.Element;
|
|
14
|
+
sheets: import("react").JSX.Element;
|
|
15
|
+
sheetOpen: boolean;
|
|
16
|
+
openSettings: () => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ProviderGrid(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { Site } from '../core/sites';
|
|
3
|
+
export declare function SiteIcon({ site, size, tinted, style, className }: {
|
|
4
|
+
site: Site;
|
|
5
|
+
size?: number;
|
|
6
|
+
tinted?: boolean;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
package/dist/ui/SourceGate.d.ts
CHANGED
|
@@ -1,19 +1,39 @@
|
|
|
1
1
|
import { type PopupStatus, type Started } from '../data/connect';
|
|
2
|
+
import { type IdlePrefs } from './IdleSettings';
|
|
3
|
+
export interface IdleState {
|
|
4
|
+
prefs: IdlePrefs;
|
|
5
|
+
set: (p: Partial<IdlePrefs>) => void;
|
|
6
|
+
shareUrl?: string;
|
|
7
|
+
}
|
|
2
8
|
export declare function hostOf(src: string): string;
|
|
3
9
|
export interface Connect {
|
|
4
10
|
busy: boolean;
|
|
5
11
|
status: PopupStatus | null;
|
|
6
12
|
err: string | null;
|
|
13
|
+
connected: boolean;
|
|
14
|
+
connect: () => void;
|
|
7
15
|
start: (url: string, ask: boolean) => void;
|
|
8
16
|
}
|
|
9
17
|
export declare function useConnect(appUrl: string | undefined, onReady: (s: Started) => void): Connect;
|
|
10
|
-
export declare function SourceGate({ src, ask, connect, onClear }: {
|
|
18
|
+
export declare function SourceGate({ idle, src, ask, connect, page, poster, onClear }: {
|
|
19
|
+
idle: IdleState;
|
|
11
20
|
src: string;
|
|
12
21
|
ask: boolean;
|
|
13
22
|
connect: Connect;
|
|
23
|
+
page: boolean;
|
|
24
|
+
poster?: string | null;
|
|
14
25
|
onClear?: () => void;
|
|
15
26
|
}): import("react").JSX.Element;
|
|
16
|
-
export declare function StartCard({ connect, onPick }: {
|
|
27
|
+
export declare function StartCard({ idle, connect, page, poster, onPick }: {
|
|
28
|
+
idle: IdleState;
|
|
17
29
|
connect: Connect;
|
|
30
|
+
page: boolean;
|
|
31
|
+
poster?: string | null;
|
|
18
32
|
onPick: (url: string) => void;
|
|
19
33
|
}): import("react").JSX.Element;
|
|
34
|
+
export declare function ErrorGate({ idle, message, onRetry, page }: {
|
|
35
|
+
idle: IdleState;
|
|
36
|
+
message: string;
|
|
37
|
+
onRetry: () => void;
|
|
38
|
+
page: boolean;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
@@ -20,6 +20,22 @@ export interface PlayerControls {
|
|
|
20
20
|
fullscreen?: boolean;
|
|
21
21
|
settings?: boolean;
|
|
22
22
|
}
|
|
23
|
+
export interface PlaybackState {
|
|
24
|
+
t: number;
|
|
25
|
+
dur: number;
|
|
26
|
+
playing: boolean;
|
|
27
|
+
idx: number;
|
|
28
|
+
seekN: number;
|
|
29
|
+
lang: string | null;
|
|
30
|
+
muted: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface PlayerHandle {
|
|
33
|
+
seek: (t: number) => void;
|
|
34
|
+
play: () => void;
|
|
35
|
+
pause: () => void;
|
|
36
|
+
toggle: () => void;
|
|
37
|
+
toggleMute: () => void;
|
|
38
|
+
}
|
|
23
39
|
export interface VocalStackPlayerProps {
|
|
24
40
|
id?: string;
|
|
25
41
|
src?: string;
|
|
@@ -38,11 +54,16 @@ export interface VocalStackPlayerProps {
|
|
|
38
54
|
syncUrl?: boolean;
|
|
39
55
|
endCard?: EndCardOptions | false;
|
|
40
56
|
appUrl?: string;
|
|
57
|
+
poster?: string | null;
|
|
58
|
+
voice?: string | null;
|
|
41
59
|
settingsExtra?: ReactNode;
|
|
42
60
|
shareUrl?: (t: number | null) => string;
|
|
61
|
+
onShare?: () => void;
|
|
43
62
|
onSource?: (s: LoadedSource) => void;
|
|
44
63
|
onProgress?: (pct: number | null) => void;
|
|
45
64
|
onError?: (e: ErrorLike) => void;
|
|
65
|
+
onPlayback?: (s: PlaybackState) => void;
|
|
66
|
+
compact?: boolean;
|
|
46
67
|
className?: string;
|
|
47
68
|
}
|
|
48
|
-
export declare
|
|
69
|
+
export declare const VocalStackPlayer: import("react").ForwardRefExoticComponent<VocalStackPlayerProps & import("react").RefAttributes<PlayerHandle>>;
|
package/dist/ui/core.d.ts
CHANGED
|
@@ -118,8 +118,9 @@ export interface VoiceSheetHooks {
|
|
|
118
118
|
castBuilding?: (sp: CastMember, ctx: VoiceSheetCtx) => boolean;
|
|
119
119
|
castWarn?: (sp: CastMember, ctx: VoiceSheetCtx) => string | null;
|
|
120
120
|
}
|
|
121
|
-
export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred, langs, srcLang, canTranslate, pickedLang, setPickedLang, side, hearOriginal, timed, stockVoices, stickyPicker, pickerBusy, voiceSheet }: {
|
|
121
|
+
export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred, langs, srcLang, canTranslate, pickedLang, setPickedLang, side, hearOriginal, timed, stockVoices, stickyPicker, pickerBusy, voiceSheet, forcedVoice }: {
|
|
122
122
|
voiceSheet?: VoiceSheetHooks;
|
|
123
|
+
forcedVoice?: string | null;
|
|
123
124
|
hearOriginal?: boolean;
|
|
124
125
|
stockVoices?: boolean;
|
|
125
126
|
stickyPicker?: boolean;
|
|
@@ -154,6 +155,7 @@ export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred
|
|
|
154
155
|
player: TxPlayer;
|
|
155
156
|
chip: import("react").JSX.Element | null;
|
|
156
157
|
voiceBtn: import("react").JSX.Element;
|
|
158
|
+
voiceWaiting: boolean;
|
|
157
159
|
sheets: import("react").JSX.Element | null;
|
|
158
160
|
sidePanel: import("react").JSX.Element | null;
|
|
159
161
|
voicesMine: boolean;
|
|
@@ -184,6 +186,7 @@ export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred
|
|
|
184
186
|
resetCast: () => void;
|
|
185
187
|
readLang: string | null;
|
|
186
188
|
readVoiceKey: string;
|
|
189
|
+
pickedVoiceKey: string | null;
|
|
187
190
|
readVoiceName: string;
|
|
188
191
|
canSpeak: boolean;
|
|
189
192
|
requestTrack: () => Promise<void>;
|
package/dist/ui/full.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type VoicesBtn = {
|
|
|
17
17
|
on: boolean;
|
|
18
18
|
title: string;
|
|
19
19
|
onClick: () => void;
|
|
20
|
+
busy?: boolean;
|
|
20
21
|
};
|
|
21
22
|
export type PlayerTransport = {
|
|
22
23
|
prevOn: boolean;
|
|
@@ -41,7 +42,8 @@ export declare function MiniPlayer({ pos, transport, chip, voices, onShare, onFu
|
|
|
41
42
|
onFull: () => void;
|
|
42
43
|
copied: React.ReactNode;
|
|
43
44
|
}): import("react").JSX.Element;
|
|
44
|
-
export declare function FullVideo({ noFull, page, picture, title, desk, pos, sub, wait, pct, mute, cc, ad, chip, transport, picker, sheet, voices, voicesBtn, sheetOpen, onShare, onSettings, paused, copied, onTouch, onClose }: {
|
|
45
|
+
export declare function FullVideo({ compact, noFull, page, picture, title, desk, pos, sub, wait, pct, mute, cc, ad, chip, transport, picker, sheet, voices, voicesBtn, sheetOpen, onShare, onSettings, paused, copied, onTouch, onClose }: {
|
|
46
|
+
compact?: boolean;
|
|
45
47
|
noFull?: boolean;
|
|
46
48
|
page?: boolean;
|
|
47
49
|
onTouch: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocalstack/player",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.51",
|
|
4
4
|
"description": "VocalStack video and transcript player for React: synced transcript, subtitles, spoken translations and background sound, over the public VocalStack API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"react-dom": ">=18"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@vocalstack/js-sdk": "^2.0.0-alpha.1"
|
|
39
|
+
"@vocalstack/js-sdk": "^2.0.0-alpha.1",
|
|
40
|
+
"hls.js": "^1.5.20"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@types/node": "^24.0.0",
|