@vidtreo/recorder 0.8.5 → 0.9.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.
- package/README.md +7 -7
- package/dist/index.d.ts +110 -9
- package/dist/index.js +1037 -159
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ import { VidtreoRecorder } from '@vidtreo/recorder';
|
|
|
15
15
|
|
|
16
16
|
const recorder = new VidtreoRecorder({
|
|
17
17
|
apiKey: 'your-api-key',
|
|
18
|
-
apiUrl: 'https://
|
|
18
|
+
apiUrl: 'https://api.vidtreo.com', // Optional, defaults to https://api.vidtreo.com
|
|
19
19
|
enableSourceSwitching: true,
|
|
20
20
|
maxRecordingTime: 300000,
|
|
21
21
|
onUploadComplete: (result) => {
|
|
@@ -47,7 +47,7 @@ Creates a new recorder instance with the specified configuration.
|
|
|
47
47
|
**Parameters:**
|
|
48
48
|
|
|
49
49
|
- `config.apiKey` (required): Your API key for backend authentication
|
|
50
|
-
- `config.apiUrl` (
|
|
50
|
+
- `config.apiUrl` (optional): Your backend API URL endpoint. Defaults to `https://api.vidtreo.com` if not provided
|
|
51
51
|
- `config.enableSourceSwitching` (optional): Enable switching between camera and screen during recording. Default: `false`
|
|
52
52
|
- `config.enableMute` (optional): Enable mute/unmute functionality. When disabled, `muteAudio()`, `unmuteAudio()`, and `toggleMute()` will throw errors. Default: `true`
|
|
53
53
|
- `config.enablePause` (optional): Enable pause/resume functionality. When disabled, `pauseRecording()` and `resumeRecording()` will throw errors. Default: `true`
|
|
@@ -62,7 +62,7 @@ Creates a new recorder instance with the specified configuration.
|
|
|
62
62
|
- `config.onRecordingStop` (optional): Callback invoked when recording stops
|
|
63
63
|
- `config.onError` (optional): Callback invoked when a stream error occurs
|
|
64
64
|
|
|
65
|
-
**Throws:** `Error` if `apiKey`
|
|
65
|
+
**Throws:** `Error` if `apiKey` is missing
|
|
66
66
|
|
|
67
67
|
#### Methods
|
|
68
68
|
|
|
@@ -200,7 +200,7 @@ Cleans up all resources, stops active streams, and cancels any pending operation
|
|
|
200
200
|
```typescript
|
|
201
201
|
interface VidtreoRecorderConfig {
|
|
202
202
|
apiKey: string;
|
|
203
|
-
apiUrl
|
|
203
|
+
apiUrl?: string;
|
|
204
204
|
enableSourceSwitching?: boolean;
|
|
205
205
|
enableMute?: boolean;
|
|
206
206
|
enablePause?: boolean;
|
|
@@ -281,7 +281,7 @@ import { VidtreoRecorder } from '@vidtreo/recorder';
|
|
|
281
281
|
|
|
282
282
|
const recorder = new VidtreoRecorder({
|
|
283
283
|
apiKey: 'your-api-key',
|
|
284
|
-
apiUrl: 'https://api.example.com',
|
|
284
|
+
apiUrl: 'https://api.example.com', // Optional, defaults to https://api.vidtreo.com
|
|
285
285
|
onUploadComplete: (result) => {
|
|
286
286
|
console.log('Uploaded:', result.uploadUrl);
|
|
287
287
|
},
|
|
@@ -612,7 +612,7 @@ const controller = new RecorderController({
|
|
|
612
612
|
|
|
613
613
|
await controller.initialize({
|
|
614
614
|
apiKey: 'your-api-key',
|
|
615
|
-
backendUrl: 'https://api.example.com',
|
|
615
|
+
backendUrl: 'https://api.example.com', // Optional, defaults to https://api.vidtreo.com
|
|
616
616
|
});
|
|
617
617
|
```
|
|
618
618
|
|
|
@@ -628,7 +628,7 @@ const stream = streamManager.getStream();
|
|
|
628
628
|
|
|
629
629
|
## Configuration
|
|
630
630
|
|
|
631
|
-
Video transcoding configuration is managed through your backend API. The recorder fetches configuration using the provided `apiKey` and `apiUrl
|
|
631
|
+
Video transcoding configuration is managed through your backend API. The recorder fetches configuration using the provided `apiKey` and `apiUrl` (defaults to `https://api.vidtreo.com` if not provided). Default transcoding settings include:
|
|
632
632
|
|
|
633
633
|
- Format: MP4
|
|
634
634
|
- Frame rate: 30 fps
|