@vocalstack/player 0.1.0-alpha.63 → 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.
- package/README.md +1 -1
- package/dist/core/archive.d.ts +19 -0
- package/dist/core/dailymotion.d.ts +38 -0
- package/dist/core/embeds.d.ts +3 -1
- package/dist/core/facebook.d.ts +26 -0
- package/dist/core/find.d.ts +9 -0
- package/dist/core/loomStream.d.ts +1 -0
- package/dist/core/share.d.ts +1 -0
- package/dist/core/streamTime.d.ts +12 -0
- package/dist/core/vimeo.d.ts +38 -0
- package/dist/data/connect.d.ts +8 -0
- package/dist/data/context.d.ts +8 -2
- package/dist/ds/Icons.d.ts +1 -0
- package/dist/ds/LanguagePicker.d.ts +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4517 -3706
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/ui/DailymotionFollow.d.ts +8 -0
- package/dist/ui/IdleSettings.d.ts +18 -1
- package/dist/ui/SourceGate.d.ts +8 -1
- package/dist/ui/VimeoFollow.d.ts +9 -0
- package/dist/ui/VocalStackPlayer.d.ts +8 -1
- package/dist/ui/core.d.ts +16 -20
- package/dist/ui/full.d.ts +3 -1
- package/dist/ui/shared.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ export function Video() {
|
|
|
36
36
|
| `baseUrl` | `https://api.vocalstack.com` | |
|
|
37
37
|
| `onSource`, `onProgress`, `onError` | | Called with the loaded transcription, the transcription progress (0-100, `null` when done), and errors. |
|
|
38
38
|
| `onPlayback` | | Called about ten times a second while anything changes, with `{ t, dur, playing, idx, seekN, lang }`: the time in seconds, the length, whether it plays, the index of the current line, a counter that grows on every seek, and the language shown. |
|
|
39
|
-
| `ref` | | A `PlayerHandle`: `seek(t)`, `play()`, `pause()`, `toggle()`, `toggleMute()`,
|
|
39
|
+
| `ref` | | A `PlayerHandle`: `seek(t)`, `play()`, `pause()`, `toggle()`, `toggleMute()`, `load(link, { poster })`, which opens a video link (or a share link) in the player as if the viewer had pasted it (`poster` is an optional picture shown behind it until it plays), and `clear()`, which empties the player again. |
|
|
40
40
|
| `compact` | `false` | Small controls at any width, and no title, summary or share card when paused. For a player inside a side column or card. |
|
|
41
41
|
| `poster` | | An image shown behind the player before a video is chosen or before the visitor connects. |
|
|
42
42
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ArchiveFile {
|
|
2
|
+
name?: string;
|
|
3
|
+
format?: string;
|
|
4
|
+
source?: string;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
size?: string | number;
|
|
7
|
+
length?: string | number;
|
|
8
|
+
}
|
|
9
|
+
export declare function archiveVideoFile(id: string, meta: {
|
|
10
|
+
files?: ArchiveFile[];
|
|
11
|
+
metadata?: {
|
|
12
|
+
mediatype?: string;
|
|
13
|
+
};
|
|
14
|
+
} | null | undefined, want?: string | null): string | null;
|
|
15
|
+
export declare function archiveTarget(raw: string | null | undefined): {
|
|
16
|
+
id: string;
|
|
17
|
+
file: string | null;
|
|
18
|
+
} | null;
|
|
19
|
+
export declare function archiveSetup(id: string, file: string | null): (v: HTMLVideoElement, fail: () => void) => () => void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const DAILYMOTION_PLAYER = "x8lr5";
|
|
2
|
+
export declare function dailymotionPlayerId(id: string | null | undefined): string;
|
|
3
|
+
export declare function dailymotionLib(player?: string | null): string;
|
|
4
|
+
export declare function dailymotionFrame(video: string, at: {
|
|
5
|
+
t: number;
|
|
6
|
+
play: boolean;
|
|
7
|
+
player?: string | null;
|
|
8
|
+
}): string;
|
|
9
|
+
export interface DmState {
|
|
10
|
+
videoTime?: number;
|
|
11
|
+
playerIsPlaying?: boolean;
|
|
12
|
+
adIsPlaying?: boolean;
|
|
13
|
+
videoId?: string | null;
|
|
14
|
+
videoDuration?: number;
|
|
15
|
+
playerIsReplayScreen?: boolean;
|
|
16
|
+
playerIsMuted?: boolean;
|
|
17
|
+
playerVolume?: number;
|
|
18
|
+
playerIsBuffering?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export type DmStep = {
|
|
21
|
+
kind: 'none';
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'reload';
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'play';
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'pause';
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'seek';
|
|
30
|
+
to: number;
|
|
31
|
+
};
|
|
32
|
+
export declare function dmStep(s: DmState, want: {
|
|
33
|
+
video: string;
|
|
34
|
+
t: number;
|
|
35
|
+
playing: boolean;
|
|
36
|
+
settling?: boolean;
|
|
37
|
+
}, over?: number): DmStep;
|
|
38
|
+
export declare function dmLoud(s: DmState | null | undefined): boolean;
|
package/dist/core/embeds.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export interface EmbedAt {
|
|
|
2
2
|
t: number;
|
|
3
3
|
play: boolean;
|
|
4
4
|
host?: string;
|
|
5
|
+
player?: string | null;
|
|
5
6
|
}
|
|
6
7
|
export declare function loomId(raw: string): string | null;
|
|
7
8
|
export declare function vimeoIds(raw: string): {
|
|
@@ -23,6 +24,7 @@ export declare function sourceVideoUrl(src: {
|
|
|
23
24
|
site?: string | null;
|
|
24
25
|
embedId?: string | null;
|
|
25
26
|
} | null | undefined): string | null;
|
|
27
|
+
export declare function linkVideoFile(raw: string | null | undefined): string | null;
|
|
26
28
|
export declare function wistiaId(raw: string): string | null;
|
|
27
29
|
export declare function vidyardId(raw: string): string | null;
|
|
28
|
-
export declare function
|
|
30
|
+
export declare function stillThumb(url: string | null | undefined): string | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VmState, type VmStep } from './vimeo';
|
|
2
|
+
export interface FbState extends VmState {
|
|
3
|
+
seen: number | null;
|
|
4
|
+
}
|
|
5
|
+
export declare const FB_TICK = 0.5;
|
|
6
|
+
export declare function fbState(): FbState;
|
|
7
|
+
export declare function fbSample(s: FbState, pos: number, now: number): void;
|
|
8
|
+
export declare function fbNow(s: FbState, now: number): number | null;
|
|
9
|
+
export declare function fbStep(s: FbState, want: {
|
|
10
|
+
t: number;
|
|
11
|
+
playing: boolean;
|
|
12
|
+
settling?: boolean;
|
|
13
|
+
lead?: number;
|
|
14
|
+
}, now: number, over?: number): VmStep;
|
|
15
|
+
export declare function fbFit(box: {
|
|
16
|
+
w: number;
|
|
17
|
+
h: number;
|
|
18
|
+
}, frame: {
|
|
19
|
+
w: number;
|
|
20
|
+
h: number;
|
|
21
|
+
}): {
|
|
22
|
+
scale: number;
|
|
23
|
+
w: number;
|
|
24
|
+
h: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function fbWidth(box: number, screen: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface FindRow {
|
|
2
|
+
id: string;
|
|
3
|
+
text: string;
|
|
4
|
+
translations?: Record<string, string>;
|
|
5
|
+
}
|
|
6
|
+
export declare function findMatches(rows: FindRow[], q: string, lang?: string | null): number[];
|
|
7
|
+
export declare function stepMatch(at: number, total: number, dir: 1 | -1): number;
|
|
8
|
+
export declare function matchAt(rows: FindRow[], matches: number[], id: string | null): number;
|
|
9
|
+
export declare function findCount(at: number, total: number): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FollowSetup } from '../ui/FileFollow';
|
|
2
2
|
export declare function loomStreamUrl(id: string): Promise<string | null>;
|
|
3
|
+
export declare function isPlaylist(url: string): boolean;
|
|
3
4
|
export declare function signedLoader(master: string): (xhr: XMLHttpRequest, u: string) => void;
|
|
4
5
|
export declare function loomSetup(id: string): FollowSetup;
|
package/dist/core/share.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Span {
|
|
2
|
+
wallStart: number;
|
|
3
|
+
wallEnd?: number | null;
|
|
4
|
+
mediaStart: number;
|
|
5
|
+
}
|
|
6
|
+
export interface Gap {
|
|
7
|
+
at: number;
|
|
8
|
+
shift: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function spanGaps(spans: readonly Span[]): Gap[];
|
|
11
|
+
export declare function toStream(t: number, base: number, gaps: readonly Gap[]): number;
|
|
12
|
+
export declare function fromStream(y: number, base: number, gaps: readonly Gap[]): number;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const VIMEO_ORIGIN = "https://player.vimeo.com";
|
|
2
|
+
export declare function vimeoFrame(id: string, at: {
|
|
3
|
+
t: number;
|
|
4
|
+
h?: string | null;
|
|
5
|
+
}): string;
|
|
6
|
+
export interface VimeoMsg {
|
|
7
|
+
event?: string;
|
|
8
|
+
method?: string;
|
|
9
|
+
value?: unknown;
|
|
10
|
+
data?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export declare function vimeoMsg(origin: string, data: unknown): VimeoMsg | null;
|
|
13
|
+
export interface VmState {
|
|
14
|
+
t: number | null;
|
|
15
|
+
at: number;
|
|
16
|
+
playing: boolean;
|
|
17
|
+
buffering: boolean;
|
|
18
|
+
duration: number | null;
|
|
19
|
+
ended?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type VmStep = {
|
|
22
|
+
kind: 'none';
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'play';
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'pause';
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'seek';
|
|
29
|
+
to: number;
|
|
30
|
+
};
|
|
31
|
+
export declare function vimeoNow(s: VmState, now: number): number | null;
|
|
32
|
+
export declare function vmStep(s: VmState, want: {
|
|
33
|
+
t: number;
|
|
34
|
+
playing: boolean;
|
|
35
|
+
settling?: boolean;
|
|
36
|
+
lead?: number;
|
|
37
|
+
}, now: number, over?: number): VmStep;
|
|
38
|
+
export declare function vimeoLoud(data: Record<string, unknown> | null | undefined): boolean;
|
package/dist/data/connect.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface Started {
|
|
|
4
4
|
recordingId: string;
|
|
5
5
|
token: string;
|
|
6
6
|
expiresAt: string | null;
|
|
7
|
+
shareCode?: string | null;
|
|
7
8
|
}
|
|
8
9
|
export type PopupStatus = 'signing-in' | 'consent' | 'looking' | 'confirm' | 'checking' | 'starting';
|
|
9
10
|
export declare function openPopup(appUrl: string | undefined, ask: {
|
|
@@ -11,7 +12,14 @@ export declare function openPopup(appUrl: string | undefined, ask: {
|
|
|
11
12
|
transcription?: string;
|
|
12
13
|
ask?: boolean;
|
|
13
14
|
connect?: boolean;
|
|
15
|
+
tx?: {
|
|
16
|
+
voices: 'cloned' | 'synthetic';
|
|
17
|
+
spoken: string | null;
|
|
18
|
+
speakers: 'auto' | 'on' | 'off';
|
|
19
|
+
};
|
|
14
20
|
}, onStatus?: (s: PopupStatus) => void): Promise<Started | 'connected' | null>;
|
|
15
21
|
export declare function startFromEmbed(appUrl: string | undefined, url: string, onStatus?: (s: PopupStatus) => void): Promise<Started | null>;
|
|
16
22
|
export declare function wasConnected(appUrl: string | undefined): boolean;
|
|
17
23
|
export declare function rememberConnected(appUrl: string | undefined): void;
|
|
24
|
+
export declare function rememberedCode(link: string): string | null;
|
|
25
|
+
export declare function rememberCode(link: string, code: string | null): void;
|
package/dist/data/context.d.ts
CHANGED
|
@@ -51,8 +51,14 @@ export interface ApiOptions {
|
|
|
51
51
|
}
|
|
52
52
|
export declare function useApi(o: ApiOptions): PlayerApi;
|
|
53
53
|
export declare function withMedia(api: PlayerApi, media: string | null): PlayerApi;
|
|
54
|
-
export declare function
|
|
55
|
-
export declare function
|
|
54
|
+
export declare function isLiveRecording(r: Pick<Recording, 'kind' | 'state'> | null | undefined): boolean;
|
|
55
|
+
export declare function streamOffsetS(ingest: {
|
|
56
|
+
mediaAt?: string | null;
|
|
57
|
+
streamStartedAt?: string | null;
|
|
58
|
+
} | null | undefined): number;
|
|
59
|
+
export declare function liveJob(recording: Recording, url: string | null | undefined): TranscriptionJob | null;
|
|
60
|
+
export declare function loadSource(api: PlayerApi, id: string, recordingId?: string | null): Promise<PlayerSource>;
|
|
61
|
+
export declare function useSource(api: PlayerApi, id: string, recordingId?: string | null): {
|
|
56
62
|
source: PlayerSource | null;
|
|
57
63
|
gone: boolean;
|
|
58
64
|
error: ErrorLike | null;
|
package/dist/ds/Icons.d.ts
CHANGED
|
@@ -12,13 +12,14 @@ export interface LanguageListProps {
|
|
|
12
12
|
languages: PickerLanguage[];
|
|
13
13
|
searchPlaceholder?: string;
|
|
14
14
|
none?: string;
|
|
15
|
+
noneNote?: string;
|
|
15
16
|
pinned?: string[];
|
|
16
17
|
recent?: string[];
|
|
17
18
|
requireVoice?: boolean;
|
|
18
19
|
keepOpen?: boolean;
|
|
19
20
|
busy?: string | null;
|
|
20
21
|
}
|
|
21
|
-
export declare function useLanguageList({ open, onClose, value, onSelect, languages, searchPlaceholder, none, pinned, recent, requireVoice, keepOpen, busy }: LanguageListProps & {
|
|
22
|
+
export declare function useLanguageList({ open, onClose, value, onSelect, languages, searchPlaceholder, none, noneNote, pinned, recent, requireVoice, keepOpen, busy }: LanguageListProps & {
|
|
22
23
|
open: boolean;
|
|
23
24
|
onClose: () => void;
|
|
24
25
|
}): {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export { PlayerApiProvider, usePlayerApi, useApi, type PlayerApi, type PlayerApi
|
|
|
5
5
|
export type { ErrorLike } from './data/errors';
|
|
6
6
|
export { setErrorReporter, type MediaCred } from './core/audio';
|
|
7
7
|
export { useTranscript } from './data/transcript';
|
|
8
|
-
export { useTxPlayer, useTxVoice, useDuck, useFlash, useYtLead, useFindPull, YtFollow, MuteButton, TxLines, TxFind, lineWords, spokenWordOf, pictureT, lineEnd, PAUSE_D, PLAY_D, NO_SEEK, PUB_SIDE, type TxPlayer, type YtLead, type VoiceSheetHooks, type VoiceSheetCtx, type NoCloneNote } from './ui/core';
|
|
8
|
+
export { useTxPlayer, useTxVoice, useDuck, useFlash, useYtLead, useFindPull, type FindState, YtFollow, MuteButton, TxLines, TxFind, lineWords, spokenWordOf, pictureT, lineEnd, PAUSE_D, PLAY_D, NO_SEEK, PUB_SIDE, type TxPlayer, type YtLead, type VoiceSheetHooks, type VoiceSheetCtx, type NoCloneNote } from './ui/core';
|
|
9
9
|
export { Transport, ReplayScrub, ExportPanel, SummaryPanel, SpeakerCast, VoiceSheetBody, useSummaryIn, useViewportTranslation, useArchiveVoice, useVoiceCatalogue, type AvailableVoice, type CastMember, type SummaryState } from './ui/shared';
|
|
10
10
|
export { FullVideo, MiniPlayer, PanelSeek, browserFull, realFull, setFullTarget, type PlayerPos, type PlayerTransport, type VoicesBtn } from './ui/full';
|
|
11
11
|
export { useBackgroundBed, useSeparatedTrack, bedNote, trackPlan, REMOVE_BG_LABEL, REMOVE_BG_NOTE, type BedState, type TrackPlan, type Separated } from './core/background';
|
|
12
12
|
export { snapPosition, placePosition, type PlayPos } from './core/playPosition';
|
|
13
13
|
export { SITES, siteOf, siteById, hostOfUrl, type Site, type SiteId } from './core/sites';
|
|
14
14
|
export { SiteIcon } from './ui/SiteIcon';
|
|
15
|
-
export { hasEmbed, sourceVideoUrl } from './core/embeds';
|
|
15
|
+
export { hasEmbed, linkVideoFile, sourceVideoUrl } from './core/embeds';
|