@serimo/player 0.0.0-stage → 0.2.0

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,12 @@
1
+ import { type MotionAudioTrack, type MotionComposition } from '@serimo/core/composition';
2
+ export declare function createPlayerAudio(composition: Omit<MotionComposition, 'audio'> & {
3
+ audio?: MotionAudioTrack | MotionAudioTrack[];
4
+ }, signal: AbortSignal): {
5
+ ready: Promise<void>;
6
+ pause: () => void;
7
+ dispose: () => Promise<void>;
8
+ play(frame: number): Promise<{
9
+ originTimeMs: number;
10
+ }>;
11
+ };
12
+ //# sourceMappingURL=player-audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player-audio.d.ts","sourceRoot":"","sources":["../src/player-audio.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAGvB,MAAM,0BAA0B,CAAA;AAwFjC,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,GAAG;IAC9C,KAAK,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAAA;CAC9C,EACD,MAAM,EAAE,WAAW;;;;gBA6FL,MAAM,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;EA8FzD"}
@@ -0,0 +1,29 @@
1
+ import type { MotionComposition } from '@serimo/core/composition';
2
+ import type { createTimelineRegistry } from '@serimo/core/timeline-registry';
3
+ type Registry = ReturnType<typeof createTimelineRegistry>;
4
+ export interface PlayerHandle {
5
+ whenReady(): Promise<void>;
6
+ seek(frame: number): Promise<void>;
7
+ getComposition(): Pick<MotionComposition, 'id' | 'width' | 'height' | 'fps' | 'durationInFrames' | 'audio'>;
8
+ audio?: {
9
+ play(frame: number): Promise<{
10
+ originTimeMs: number;
11
+ }>;
12
+ pause(): void;
13
+ };
14
+ }
15
+ export declare function createPlayerSession(composition: MotionComposition, registry: Registry): {
16
+ whenReady(): Promise<void>;
17
+ seek(frame: number): Promise<void>;
18
+ getComposition(): Pick<MotionComposition, 'id' | 'width' | 'height' | 'fps' | 'durationInFrames' | 'audio'>;
19
+ audio?: {
20
+ play(frame: number): Promise<{
21
+ originTimeMs: number;
22
+ }>;
23
+ pause(): void;
24
+ };
25
+ start(): Promise<void>;
26
+ stop: () => Promise<void>;
27
+ };
28
+ export {};
29
+ //# sourceMappingURL=player-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player-session.d.ts","sourceRoot":"","sources":["../src/player-session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAI5E,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAEzD,MAAM,WAAW,YAAY;IAC3B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClC,cAAc,IAAI,IAAI,CACpB,iBAAiB,EACjB,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,kBAAkB,GAAG,OAAO,CACjE,CAAA;IACD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QACtD,KAAK,IAAI,IAAI,CAAA;KACd,CAAA;CACF;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,iBAAiB,EAC9B,QAAQ,EAAE,QAAQ;iBAdL,OAAO,CAAC,IAAI,CAAC;gBACd,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;sBAChB,IAAI,CACpB,iBAAiB,EACjB,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,kBAAkB,GAAG,OAAO,CACjE;YACO;QACN,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QACtD,KAAK,IAAI,IAAI,CAAA;KACd;;;EA2HF"}
@@ -0,0 +1,5 @@
1
+ export declare function PlayerStatus({ state, error }: {
2
+ state: 'loading' | 'ready' | 'error';
3
+ error?: string;
4
+ }): import("react").JSX.Element | null;
5
+ //# sourceMappingURL=player-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player-status.d.ts","sourceRoot":"","sources":["../src/player-status.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,KAAK,EACN,EAAE;IACD,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,sCAWA"}
@@ -0,0 +1,3 @@
1
+ import { type CompositionPlayerProps } from './composition-player.js';
2
+ export declare function CompositionPlayerBridge(props: Omit<CompositionPlayerProps, 'ref'>): import("react").JSX.Element;
3
+ //# sourceMappingURL=renderer-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-bridge.d.ts","sourceRoot":"","sources":["../src/renderer-bridge.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAA;AAKhC,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,KAAK,CAAC,+BAuD3C"}