idmission-web-sdk 1.0.336 → 1.0.338
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 +15 -22
- 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 +15 -22
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +15 -22
- 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: () =>
|
|
4
|
+
startRecording: () => void;
|
|
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.338';
|
|
54
54
|
|
|
55
55
|
function getPlatform() {
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -15359,7 +15359,7 @@ var useVideoRecorder = function useVideoRecorder(camera) {
|
|
|
15359
15359
|
console.log('button_fail 1a: ', e.data);
|
|
15360
15360
|
videoChunks.current.push(e.data);
|
|
15361
15361
|
};
|
|
15362
|
-
|
|
15362
|
+
mediaRecorder.current.onstop = function () {
|
|
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,31 +15372,24 @@ 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.
|
|
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
|
-
// }
|
|
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
|
-
};
|
|
15375
|
+
mediaRecorder.current.start(1000);
|
|
15392
15376
|
}, [camera, stream]);
|
|
15393
15377
|
var stopRecording = React.useCallback(function () {
|
|
15394
|
-
var _a
|
|
15378
|
+
var _a;
|
|
15395
15379
|
console.log('button_fail 1');
|
|
15396
15380
|
console.log('button_fail', 'useVideoRecorder:stopRecording');
|
|
15397
15381
|
console.log('button_fail', 'mediaRecorder:', mediaRecorder.current);
|
|
15398
|
-
console.log('button_fail', 'mediaRecorder:onstop:',
|
|
15399
|
-
(
|
|
15382
|
+
//console.log('button_fail', 'mediaRecorder:onstop:', mediaRecorder.current.onstop)
|
|
15383
|
+
(_a = mediaRecorder.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
15384
|
+
var blobFile = new Blob(videoChunks.current, {
|
|
15385
|
+
type: 'video/mp4'
|
|
15386
|
+
});
|
|
15387
|
+
console.log('button_fail', 'useVideoRecorder:mediaRecorder.current.onstop - blob made:', blobFile);
|
|
15388
|
+
videoChunks.current = [];
|
|
15389
|
+
setVideoUrl(URL.createObjectURL(blobFile));
|
|
15390
|
+
console.log('button_fail ', 'useVideoRecorder:mediaRecorder.current.onstop - setVideoUrl:', URL.createObjectURL(blobFile));
|
|
15391
|
+
setIsRecording(false);
|
|
15392
|
+
camera === null || camera === void 0 ? void 0 : camera.release();
|
|
15400
15393
|
}, []);
|
|
15401
15394
|
return {
|
|
15402
15395
|
isRecording: isRecording,
|