videomail-client 16.0.3 → 16.1.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.
- package/README.md +18 -0
- package/dist/cjs/index.cjs +331 -79
- package/dist/esm/client.d.ts +2 -0
- package/dist/esm/index.js +249 -66
- package/dist/esm/types/events/index.d.ts +3 -1
- package/dist/esm/types/events/params.d.ts +4 -0
- package/dist/esm/util/Despot.d.ts +2 -0
- package/dist/esm/util/html/media/AudioRecorder.d.ts +3 -0
- package/dist/esm/wrappers/container.d.ts +2 -0
- package/dist/esm/wrappers/visuals/recorder.d.ts +9 -0
- package/dist/esm/wrappers/visuals/userMedia.d.ts +8 -3
- package/dist/esm/wrappers/visuals.d.ts +3 -0
- package/dist/umd/index.js +265 -74
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -88,6 +88,8 @@ Audio recording is experimental and disabled by default. Set `audio.enabled` to
|
|
|
88
88
|
- [`videomailClient.show()`](#videomailclientshow)
|
|
89
89
|
- [`videomailClient.hide()`](#videomailclienthide)
|
|
90
90
|
- [`videomailClient.record()`](#videomailclientrecord)
|
|
91
|
+
- [`videomailClient.pause()`](#videomailclientpause)
|
|
92
|
+
- [`videomailClient.recoverCamera()`](#videomailclientrecovercamera)
|
|
91
93
|
- [`videomailClient.replay()`](#videomailclientreplayvideomail-parentelementid)
|
|
92
94
|
- [`videomailClient.startOver()`](#videomailclientstartover)
|
|
93
95
|
- [`videomailClient.getByAlias()`](#videomailclientgetbyaliasalias)
|
|
@@ -144,6 +146,22 @@ Automatically fills the DOM with a form for video recording. By default the HTML
|
|
|
144
146
|
|
|
145
147
|
Starts recording without requiring the user to press the record button.
|
|
146
148
|
|
|
149
|
+
### videomailClient.pause()
|
|
150
|
+
|
|
151
|
+
Pauses an active recording or countdown without discarding it. Idle cameras and unsent previews are left alone. Useful for native applications. To resume, refer to the next function `videomailClient.recoverCamera()`.
|
|
152
|
+
|
|
153
|
+
### videomailClient.recoverCamera()
|
|
154
|
+
|
|
155
|
+
Returns a `Promise<boolean>` indicating whether camera recovery succeeds. It restores playback for live tracks or requests a replacement stream when camera or microphone tracks have ended. Duplicate calls share the pending recovery. An unbuilt client, unsent preview, encoding, or submission is left alone and returns `false`.
|
|
156
|
+
|
|
157
|
+
Recovery preserves captured frame dimensions, frame/sample counters, and the audio sample rate. Foreground recovery never resumes capture or a countdown automatically. The user must explicitly choose Resume; that action waits for recovery before sending more frames.
|
|
158
|
+
|
|
159
|
+
With automatic pause enabled, browser visibility changes pause capture and recover the camera on return. Native hosts should call `pause()` on background and `recoverCamera()` on foreground through their own lifecycle integration. The client has no Capacitor dependency. Do not call `startOver()` to recover a paused take.
|
|
160
|
+
|
|
161
|
+
`CAMERA_RECOVERING` signals the start of recovery. `USER_MEDIA_READY` includes `recovering: true` after a replacement stream is initialized. `CAMERA_RECOVERY_FAILED` provides an `err` when access, playback, audio initialization, or the recovery deadline fails. The default notification does not reset the take; the user can retry Resume or stop to keep the recorded part. Stop, reset, unload, and submission cancel pending recovery, and late streams are stopped.
|
|
162
|
+
|
|
163
|
+
This does not reconnect a lost recording WebSocket or survive process termination. Physical-device camera and microphone validation remains necessary.
|
|
164
|
+
|
|
147
165
|
### videomailClient.replay(videomail[, parentElementId])
|
|
148
166
|
|
|
149
167
|
Adds a video player for the supplied videomail.
|