@vidtreo/recorder 1.1.0 → 1.2.1

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,55 @@
1
+ import type { CameraConstraints } from "./core/stream/types";
2
+ import type { SourceType } from "./core/types/recorder-types";
3
+ export type VidtreoRecorderConfig = {
4
+ apiKey: string;
5
+ apiUrl: string;
6
+ enableSourceSwitching?: boolean;
7
+ enableMute?: boolean;
8
+ enablePause?: boolean;
9
+ enableDeviceChange?: boolean;
10
+ maxRecordingTime?: number;
11
+ countdownDuration?: number;
12
+ userMetadata?: Record<string, unknown>;
13
+ onUploadComplete?: (result: {
14
+ recordingId: string;
15
+ uploadUrl: string;
16
+ }) => void;
17
+ onUploadProgress?: (progress: number) => void;
18
+ onUploadError?: (error: Error) => void;
19
+ onRecordingStart?: () => void;
20
+ onRecordingStop?: () => void;
21
+ onError?: (error: Error) => void;
22
+ };
23
+ export type RecordingStartOptions = {
24
+ video?: boolean | CameraConstraints;
25
+ audio?: boolean | MediaTrackConstraints;
26
+ };
27
+ export type RecordingStopResult = {
28
+ recordingId: string;
29
+ uploadUrl: string;
30
+ blob: Blob;
31
+ };
32
+ export declare class VidtreoRecorder {
33
+ private readonly controller;
34
+ private readonly config;
35
+ private readonly uploadService;
36
+ private isInitialized;
37
+ constructor(config: VidtreoRecorderConfig);
38
+ initialize(): Promise<void>;
39
+ startPreview(sourceType?: SourceType): Promise<MediaStream>;
40
+ startRecording(_options?: RecordingStartOptions, sourceType?: SourceType): Promise<void>;
41
+ switchSource(sourceType: SourceType): Promise<void>;
42
+ stopRecording(): Promise<RecordingStopResult>;
43
+ getAvailableDevices(): Promise<import(".").AvailableDevices>;
44
+ muteAudio(): void;
45
+ unmuteAudio(): void;
46
+ toggleMute(): void;
47
+ isMuted(): boolean;
48
+ pauseRecording(): void;
49
+ resumeRecording(): void;
50
+ isPaused(): boolean;
51
+ getRecordingState(): import(".").RecordingState;
52
+ getStream(): MediaStream | null;
53
+ cleanup(): void;
54
+ private ensureInitialized;
55
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidtreo/recorder",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "description": "Vidtreo SDK for browser-based video recording and transcoding. Features include camera/screen recording, real-time MP4 transcoding, audio level analysis, mute/pause controls, source switching, device selection, and automatic backend uploads. Similar to Ziggeo and Addpipe, Vidtreo provides enterprise-grade video processing capabilities for web applications.",
6
6
  "main": "./dist/index.js",
@@ -41,17 +41,16 @@
41
41
  "ziggeo",
42
42
  "addpipe"
43
43
  ],
44
- "author": "cfonseca@vidtreo.com",
45
44
  "license": "MIT",
46
45
  "dependencies": {
47
- "mediabunny": "^1.27.1",
48
- "ua-parser-js": "^2.0.7"
46
+ "mediabunny": "^1.32.2",
47
+ "ua-parser-js": "^2.0.9"
49
48
  },
50
49
  "devDependencies": {
51
- "@happy-dom/global-registrator": "^20.0.11",
52
- "@types/node": "^24.10.1",
50
+ "@happy-dom/global-registrator": "^20.6.0",
51
+ "@types/node": "^25.2.3",
53
52
  "typescript": "^5.9.3",
54
- "vite": "^7.2.4"
53
+ "vite": "^7.3.1"
55
54
  },
56
55
  "publishConfig": {
57
56
  "access": "public"