@vocalstack/player 0.1.0-alpha.62 → 0.1.0-alpha.64

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.
@@ -0,0 +1,8 @@
1
+ export declare function DailymotionFollow({ video, player: playerId, t, playing, seekN, onToggle }: {
2
+ video: string;
3
+ player?: string | null;
4
+ t: number;
5
+ playing: boolean;
6
+ seekN: number;
7
+ onToggle?: () => void;
8
+ }): import("react").JSX.Element | null;
@@ -7,11 +7,28 @@ export interface IdlePrefs {
7
7
  voices: 'cloned' | 'synthetic';
8
8
  removeBackground: boolean;
9
9
  muted: boolean;
10
+ spoken: string | null;
11
+ speakers: 'auto' | 'on' | 'off';
10
12
  }
13
+ export declare const CLONE_CONSENT_KEY = "vsp.cloneConsent";
14
+ export declare const hasCloneConsent: () => boolean;
15
+ export declare const grantCloneConsent: () => void;
16
+ export declare function CloneConsent({ onYes, onNo }: {
17
+ onYes: () => void;
18
+ onNo: () => void;
19
+ }): import("react").JSX.Element;
20
+ export declare function CloneToggle({ on, onChange }: {
21
+ on: boolean;
22
+ onChange: (on: boolean) => void;
23
+ }): import("react").JSX.Element;
11
24
  export declare const IDLE_DEFAULTS: IdlePrefs;
12
- export declare function useIdleControls(prefs: IdlePrefs, set: (p: Partial<IdlePrefs>) => void): {
25
+ export declare function useIdleControls(prefs: IdlePrefs, set: (p: Partial<IdlePrefs>) => void, pre?: boolean): {
13
26
  chip: import("react").JSX.Element;
14
27
  sheets: import("react").JSX.Element;
15
28
  sheetOpen: boolean;
16
29
  openSettings: () => void;
30
+ openTx: () => void;
31
+ txSummary: string;
32
+ cloneToggle: import("react").JSX.Element | null;
33
+ modal: import("react").JSX.Element | null;
17
34
  };
@@ -6,13 +6,20 @@ export interface IdleState {
6
6
  shareUrl?: string;
7
7
  }
8
8
  export declare function hostOf(src: string): string;
9
+ export interface TxChoice {
10
+ voices: 'cloned' | 'synthetic';
11
+ spoken: string | null;
12
+ speakers: 'auto' | 'on' | 'off';
13
+ }
14
+ export declare function txChoiceOf(p: IdlePrefs): TxChoice;
9
15
  export interface Connect {
10
16
  busy: boolean;
11
17
  status: PopupStatus | null;
12
18
  err: string | null;
13
19
  connected: boolean;
14
20
  connect: () => void;
15
- start: (url: string, ask: boolean) => void;
21
+ start: (url: string, ask: boolean, opts?: TxChoice) => void;
22
+ clear: () => void;
16
23
  }
17
24
  export declare function useConnect(appUrl: string | undefined, onReady: (s: Started) => void): Connect;
18
25
  export declare function SourceGate({ idle, src, ask, connect, page, poster, onClear }: {
@@ -0,0 +1,9 @@
1
+ export declare function VimeoFollow({ id, h, t, playing, seekN, title, onToggle }: {
2
+ id: string;
3
+ h?: string | null;
4
+ t: number;
5
+ playing: boolean;
6
+ seekN: number;
7
+ title: string;
8
+ onToggle?: () => void;
9
+ }): import("react").JSX.Element | null;
@@ -35,9 +35,14 @@ export interface PlayerHandle {
35
35
  pause: () => void;
36
36
  toggle: () => void;
37
37
  toggleMute: () => void;
38
+ load: (link: string, opts?: {
39
+ poster?: string | null;
40
+ }) => void;
41
+ clear: () => void;
38
42
  }
39
43
  export interface VocalStackPlayerProps {
40
44
  id?: string;
45
+ recording?: string | null;
41
46
  src?: string;
42
47
  token?: TokenSource | null;
43
48
  baseUrl?: string | null;
@@ -48,6 +53,8 @@ export interface VocalStackPlayerProps {
48
53
  settings?: PlayerSettings;
49
54
  initial?: PlayerSettings;
50
55
  onSettingsChange?: (s: Required<PlayerSettings>) => void;
56
+ find?: string;
57
+ onFindChange?: (q: string) => void;
51
58
  controls?: PlayerControls;
52
59
  autoplay?: boolean;
53
60
  startAt?: number | null;
@@ -55,6 +62,7 @@ export interface VocalStackPlayerProps {
55
62
  endCard?: EndCardOptions | false;
56
63
  appUrl?: string;
57
64
  poster?: string | null;
65
+ dailymotionPlayer?: string;
58
66
  voice?: string | null;
59
67
  settingsExtra?: ReactNode;
60
68
  shareUrl?: (t: number | null) => string;
package/dist/ui/core.d.ts CHANGED
@@ -4,6 +4,7 @@ import { type ErrorLike } from '../data/transcript';
4
4
  import { type Model, type Row, type Word } from '../core/transcript';
5
5
  import { type ReadPos, type VoiceClip } from '../core/voiceplayer';
6
6
  import { type PlayPos } from '../core/playPosition';
7
+ import { type Gap } from '../core/streamTime';
7
8
  import { type AvailableVoice, type CastMember } from './shared';
8
9
  export declare function lineWords(rows: Row[], i: number, lang?: string | null): Word[];
9
10
  export declare function spokenWordOf(player: Pick<TxPlayer, 't' | 'idx' | 'engaged' | 'wordSync' | 'clipPos'>, i: number, words: Word[]): number | null;
@@ -19,7 +20,8 @@ export interface YtLead {
19
20
  }) => void;
20
21
  bind: (cmd: ((func: string, args?: unknown[]) => void) | null) => void;
21
22
  }
22
- export declare function YtFollow({ ytId, title, t, playing: wantPlay, seekN, onToggle, onAd, endT, onGone, onKnown, lead, onTime, waiting }: {
23
+ export declare function YtFollow({ busy, ytId, title, t, playing: wantPlay, seekN, onToggle, onAd, endT, onGone, onKnown, lead, onTime, waiting }: {
24
+ busy?: boolean;
23
25
  waiting?: boolean;
24
26
  onTime?: (t: number) => void;
25
27
  lead?: YtLead;
@@ -80,7 +82,7 @@ export interface TxPlayer {
80
82
  silence?: (on: boolean) => void;
81
83
  }
82
84
  export declare function useDuck(players: TxPlayer[], ducked: boolean): void;
83
- export declare function useYtLead(rows: Row[], lenS: number | null, offsetS: number, edgeS: number | null): {
85
+ export declare function useYtLead(rows: Row[], lenS: number | null, offsetS: number, edgeS: number | null, gaps?: readonly Gap[]): {
84
86
  player: TxPlayer;
85
87
  lead: YtLead;
86
88
  setVideoSound: (on: boolean) => void;
@@ -118,7 +120,8 @@ export interface VoiceSheetHooks {
118
120
  castBuilding?: (sp: CastMember, ctx: VoiceSheetCtx) => boolean;
119
121
  castWarn?: (sp: CastMember, ctx: VoiceSheetCtx) => string | null;
120
122
  }
121
- export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred, langs, srcLang, canTranslate, pickedLang, setPickedLang, side, hearOriginal, timed, stockVoices, stickyPicker, pickerBusy, voiceSheet, forcedVoice }: {
123
+ export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred, langs, srcLang, canTranslate, pickedLang, setPickedLang, side, hearOriginal, timed, stockVoices, stickyPicker, pickerBusy, voiceSheet, forcedVoice, consent }: {
124
+ consent?: boolean;
122
125
  voiceSheet?: VoiceSheetHooks;
123
126
  forcedVoice?: string | null;
124
127
  hearOriginal?: boolean;
@@ -155,6 +158,9 @@ export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred
155
158
  player: TxPlayer;
156
159
  chip: import("react").JSX.Element | null;
157
160
  voiceBtn: import("react").JSX.Element;
161
+ nearRow: import("react").Dispatch<import("react").SetStateAction<number | null>>;
162
+ clipsReady: boolean;
163
+ clipFor: (id: number | null | undefined) => boolean;
158
164
  voiceWaiting: boolean;
159
165
  sheets: import("react").JSX.Element | null;
160
166
  sidePanel: import("react").JSX.Element | null;
@@ -194,21 +200,6 @@ export declare function useTxVoice({ recordingId, model, rows, lenS, ended, cred
194
200
  clips: VoiceClip[];
195
201
  setNear: import("react").Dispatch<import("react").SetStateAction<number | null>>;
196
202
  closePicker: () => void;
197
- langList: {
198
- value: string | null;
199
- onSelect: (c: string | null) => void;
200
- languages: {
201
- code: string;
202
- label: string;
203
- native: string;
204
- flag: string;
205
- voice: boolean;
206
- }[];
207
- searchPlaceholder: string;
208
- none: string;
209
- pinned: string[];
210
- recent: string[];
211
- };
212
203
  };
213
204
  export declare function TxLines({ model, rows, player, fixed, applied, onFixOpen, onWord, onFix, fixMode, fixingId, marks, fixBadges, tail, tailFg, running, desk, feedRef, listener, showLabels, find, findOpen, lang, warm, onVisible, wordHl }: {
214
205
  model: Model;
@@ -237,14 +228,19 @@ export declare function TxLines({ model, rows, player, fixed, applied, onFixOpen
237
228
  onVisible?: (ids: number[]) => void;
238
229
  wordHl?: boolean;
239
230
  }): import("react").JSX.Element;
231
+ export interface FindState {
232
+ hits: number;
233
+ at: number;
234
+ step: (dir: 1 | -1) => void;
235
+ }
240
236
  export declare function TxFind({ open, q, onQ, onClose, hits, desk, inline, flash }: {
241
237
  open: boolean;
242
238
  q: string;
243
239
  onQ: (q: string) => void;
244
240
  onClose: () => void;
245
- hits: number;
241
+ hits: number | FindState;
246
242
  desk: boolean;
247
243
  inline?: boolean;
248
244
  flash?: string | null;
249
245
  }): import("react").JSX.Element;
250
- export declare function useFindPull(feedRef: React.RefObject<HTMLDivElement>, rows: Row[], open: boolean, q: string, setOpen: (v: boolean) => void): number;
246
+ export declare function useFindPull(feedRef: React.RefObject<HTMLDivElement>, rows: Row[], open: boolean, q: string, setOpen: (v: boolean) => void, lang?: string | null): FindState;
package/dist/ui/full.d.ts CHANGED
@@ -42,7 +42,9 @@ export declare function MiniPlayer({ pos, transport, chip, voices, onShare, onFu
42
42
  onFull: () => void;
43
43
  copied: React.ReactNode;
44
44
  }): import("react").JSX.Element;
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 }: {
45
+ export declare function FullVideo({ topLeft, modal, 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
+ topLeft?: React.ReactNode;
47
+ modal?: React.ReactNode;
46
48
  compact?: boolean;
47
49
  noFull?: boolean;
48
50
  page?: boolean;
@@ -191,7 +191,8 @@ export declare function useVoiceCatalogue(lang: string | null, active: boolean,
191
191
  voices: AvailableVoice[];
192
192
  } | null;
193
193
  export declare function namedCount(model: Model): number;
194
- export declare function useArchiveVoice({ recordingId, lang, ended, cred, pickedVoice, sentenceIds }: {
194
+ export declare function useArchiveVoice({ recordingId, lang, ended, cred, pickedVoice, sentenceIds, consent }: {
195
+ consent?: boolean;
195
196
  recordingId: string | null;
196
197
  lang: string | null;
197
198
  ended: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocalstack/player",
3
- "version": "0.1.0-alpha.62",
3
+ "version": "0.1.0-alpha.64",
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",