Skip to content

Create professional demos and 3D mockups in seconds, directly in your browser

feat(types): expose camera stream in recording context

Cris2b8c2e1ea606
diff --git a/types/index.ts b/types/index.ts
index 24f0e33..92f0a43 100644
--- a/types/index.ts
+++ b/types/index.ts
@@ -5,4 +5,5 @@ export * from './background.types';
export * from './zoom.types';
export * from './mockup.types';
export * from './audio.types';
-export * from './cursor.types';
\ No newline at end of file
+export * from './cursor.types';
+export * from './camera.types';
\ No newline at end of file
diff --git a/types/recording.types.ts b/types/recording.types.ts
index 668ee68..8909970 100644
--- a/types/recording.types.ts
+++ b/types/recording.types.ts
@@ -1,3 +1,5 @@
+import type { CameraConfig, RecordingSetupConfig } from "./camera.types";
+
export type RecordingState = "idle" | "countdown" | "recording" | "processing";
export interface RecordingResult {
@@ -11,11 +13,15 @@ export interface RecordingContextType {
countdown: number;
recordingTime: number;
error: string | null;
- startCountdown: () => Promise<void>;
+ startCountdown: (config?: RecordingSetupConfig) => Promise<void>;
stopRecording: () => void;
cancelRecording: () => void;
isIdle: boolean;
isCountdown: boolean;
isRecording: boolean;
isProcessing: boolean;
+
+ cameraStream: MediaStream | null;
+ cameraConfig: CameraConfig | null;
+ updateCameraConfig: (partial: Partial<CameraConfig>) => void;
}