aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/RecordingBox/RecordingView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-02 09:26:37 -0400
committerbobzel <zzzman@gmail.com>2024-09-02 09:26:37 -0400
commitcda69e48361fce8d71a4dc66edd9dd976a27f52d (patch)
tree82b9a1a5967ae88a9534f89f7eaed3aeb289652f /src/client/views/nodes/RecordingBox/RecordingView.tsx
parentc01828308714874589d1f60c33ca59df4c656c0c (diff)
parenta958577d4c27b276aa37484e3f895e196138b17c (diff)
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/views/nodes/RecordingBox/RecordingView.tsx')
-rw-r--r--src/client/views/nodes/RecordingBox/RecordingView.tsx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/views/nodes/RecordingBox/RecordingView.tsx b/src/client/views/nodes/RecordingBox/RecordingView.tsx
index b8451fe60..37ffca2d6 100644
--- a/src/client/views/nodes/RecordingBox/RecordingView.tsx
+++ b/src/client/views/nodes/RecordingBox/RecordingView.tsx
@@ -1,6 +1,4 @@
-/* eslint-disable jsx-a11y/label-has-associated-control */
/* eslint-disable react/button-has-type */
-/* eslint-disable jsx-a11y/control-has-associated-label */
import * as React from 'react';
import { useEffect, useRef, useState } from 'react';
import { IconContext } from 'react-icons';
@@ -14,7 +12,7 @@ import { ProgressBar } from './ProgressBar';
import './RecordingView.scss';
export interface MediaSegment {
- videoChunks: any[];
+ videoChunks: Blob[];
endTime: number;
startTime: number;
presentation?: Presentation;
@@ -91,15 +89,15 @@ export function RecordingView(props: IRecordingViewProps) {
}, []);
useEffect(() => {
- let interval: any = null;
+ let interval: null | NodeJS.Timeout = null;
if (recording) {
interval = setInterval(() => {
setRecordingTimer(unit => unit + 1);
}, 10);
} else if (!recording && recordingTimer !== 0) {
- clearInterval(interval);
+ interval && clearInterval(interval);
}
- return () => clearInterval(interval);
+ return interval ? () => clearInterval(interval!) : undefined;
}, [recording]);
const setVideoProgressHelper = (curProgrss: number) => {
@@ -127,9 +125,9 @@ export function RecordingView(props: IRecordingViewProps) {
if (!videoRecorder.current) videoRecorder.current = new MediaRecorder(await startShowingStream());
// temporary chunks of video
- let videoChunks: any = [];
+ let videoChunks: Blob[] = [];
- videoRecorder.current.ondataavailable = (event: any) => {
+ videoRecorder.current.ondataavailable = (event: BlobEvent) => {
if (event.data.size > 0) videoChunks.push(event.data);
};