idmission-web-sdk 1.0.334 → 1.0.336
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/dist/lib/camera/useVideoRecorder.d.ts +1 -1
- package/dist/sdk2.cjs.development.js +19 -3
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +19 -3
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +19 -3
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Camera } from './Camera';
|
|
2
2
|
export declare const useVideoRecorder: (camera: Camera | null) => {
|
|
3
3
|
isRecording: boolean;
|
|
4
|
-
startRecording: () => void;
|
|
4
|
+
startRecording: () => (() => void) | undefined;
|
|
5
5
|
stopRecording: () => void;
|
|
6
6
|
videoUrl: string | null;
|
|
7
7
|
};
|
|
@@ -50,7 +50,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
50
50
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
51
51
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
52
52
|
|
|
53
|
-
var webSdkVersion = '1.0.
|
|
53
|
+
var webSdkVersion = '1.0.336';
|
|
54
54
|
|
|
55
55
|
function getPlatform() {
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -15356,10 +15356,10 @@ var useVideoRecorder = function useVideoRecorder(camera) {
|
|
|
15356
15356
|
audioBitsPerSecond: 32000
|
|
15357
15357
|
});
|
|
15358
15358
|
mediaRecorder.current.ondataavailable = function (e) {
|
|
15359
|
-
console.log('button_fail 1a');
|
|
15359
|
+
console.log('button_fail 1a: ', e.data);
|
|
15360
15360
|
videoChunks.current.push(e.data);
|
|
15361
15361
|
};
|
|
15362
|
-
|
|
15362
|
+
var stopFn = function stopFn() {
|
|
15363
15363
|
console.log('button_fail 2');
|
|
15364
15364
|
console.log('button_fail', 'useVideoRecorder:mediaRecorder.current.onstop');
|
|
15365
15365
|
var blobFile = new Blob(videoChunks.current, {
|
|
@@ -15372,7 +15372,23 @@ var useVideoRecorder = function useVideoRecorder(camera) {
|
|
|
15372
15372
|
setIsRecording(false);
|
|
15373
15373
|
camera === null || camera === void 0 ? void 0 : camera.release();
|
|
15374
15374
|
};
|
|
15375
|
+
mediaRecorder.current.addEventListener('stop', stopFn);
|
|
15376
|
+
// mediaRecorder.current.onstop = () => {
|
|
15377
|
+
// console.log('button_fail 2')
|
|
15378
|
+
// console.log('button_fail', 'useVideoRecorder:mediaRecorder.current.onstop')
|
|
15379
|
+
// const blobFile = new Blob(videoChunks.current, { type: 'video/mp4' })
|
|
15380
|
+
// console.log('button_fail', 'useVideoRecorder:mediaRecorder.current.onstop - blob made:', blobFile)
|
|
15381
|
+
// videoChunks.current = []
|
|
15382
|
+
// setVideoUrl(URL.createObjectURL(blobFile))
|
|
15383
|
+
// console.log('button_fail', 'useVideoRecorder:mediaRecorder.current.onstop - setVideoUrl:', URL.createObjectURL(blobFile))
|
|
15384
|
+
// setIsRecording(false)
|
|
15385
|
+
// camera?.release()
|
|
15386
|
+
// }
|
|
15375
15387
|
mediaRecorder.current.start();
|
|
15388
|
+
return function () {
|
|
15389
|
+
var _a;
|
|
15390
|
+
(_a = mediaRecorder.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('stop', stopFn);
|
|
15391
|
+
};
|
|
15376
15392
|
}, [camera, stream]);
|
|
15377
15393
|
var stopRecording = React.useCallback(function () {
|
|
15378
15394
|
var _a, _b;
|