diff options
Diffstat (limited to 'src/client/views/nodes/RecordingBox/RecordingView.tsx')
-rw-r--r-- | src/client/views/nodes/RecordingBox/RecordingView.tsx | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/client/views/nodes/RecordingBox/RecordingView.tsx b/src/client/views/nodes/RecordingBox/RecordingView.tsx index d2adff95a..d99492095 100644 --- a/src/client/views/nodes/RecordingBox/RecordingView.tsx +++ b/src/client/views/nodes/RecordingBox/RecordingView.tsx @@ -69,23 +69,13 @@ export function RecordingView(props: IRecordingViewProps) { if (finished) { props.setDuration(recordingTimer * 100) let allVideoChunks: any = [] - console.log(videos) videos.forEach((vid) => { console.log(vid.videoChunks) allVideoChunks = allVideoChunks.concat(vid.videoChunks) }) - console.log(allVideoChunks) const videoFile = new File(allVideoChunks, "video.mkv", { type: allVideoChunks[0].type, lastModified: Date.now() }); - // const uploadVideo = async () => { - // const [{ result }] = await Networking.UploadFilesToServer(videoFile); - // console.log("upload result", result); - // if (!(result instanceof Error)) { - // setResult(result) - // } - // } - Networking.UploadFilesToServer(videoFile) .then((data) => { const result = data[0].result @@ -95,13 +85,9 @@ export function RecordingView(props: IRecordingViewProps) { alert("video conversion failed"); } }) - // uploadVideo() // this.dataDoc[this.fieldKey + "-duration"] = (new Date().getTime() - this.recordingStart!) / 1000; - - - // change to one recording box } @@ -192,7 +178,6 @@ export function RecordingView(props: IRecordingViewProps) { // recording paused videoRecorder.current.onpause = (event: any) => { // append the current portion to the video pieces - console.log(videoChunks) setVideos(videos => [...videos, { videoChunks: videoChunks, endTime: recordingTimerRef.current }]) // reset the temporary chunks @@ -201,7 +186,6 @@ export function RecordingView(props: IRecordingViewProps) { } videoRecorder.current.onresume = async (event: any) => { - console.log(event) await startShowingStream(); setRecording(true); } @@ -228,7 +212,6 @@ export function RecordingView(props: IRecordingViewProps) { } const startOrResume = () => { - console.log('[RecordingView.tsx] startOrResume') if (!videoRecorder.current || videoRecorder.current.state === "inactive") { record(); } else if (videoRecorder.current.state === "paused") { @@ -236,22 +219,6 @@ export function RecordingView(props: IRecordingViewProps) { } } - // const playSegment = (idx: number) => { - // console.log(idx) - // let currentChunks = videos[idx].chunks - // console.log(currentChunks) - - // const blob = new Blob(currentChunks, { - // type: 'video/webm' - // }) - // const blobUrl = URL.createObjectURL(blob) - // console.log(blobUrl) - - // videoElementRef.current!.srcObject = null - // videoElementRef.current!.src = blobUrl - // videoElementRef.current!.muted = false - // } - const clearPrevious = () => { const numVideos = videos.length setRecordingTimer(numVideos == 1 ? 0 : videos[numVideos - 2].endTime) @@ -286,14 +253,6 @@ export function RecordingView(props: IRecordingViewProps) { return toTwoDigit(minutes) + " : " + toTwoDigit(seconds); } - - - - useEffect(() => { - console.log(videos.map((elt) => elt.endTime / MAXTIME * 100)) - console.log(videos) - }, [videos]) - return ( <div className="recording-container"> <div className="video-wrapper"> |