Compare commits

..

No commits in common. "1c92406b1c33a8e2153b28f1f8c7e880ae91a78a" and "31e0e89c921801f3e6801cd29159eebf6f9fbd83" have entirely different histories.

4 changed files with 14 additions and 75 deletions

65
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "WGShare.Metting",
"version": "0.1.14",
"version": "0.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "WGShare.Metting",
"version": "0.1.14",
"version": "0.0.1",
"dependencies": {
"@ant-design/icons": "^5.3.7",
"@microsoft/signalr": "^8.0.0",
@ -28,8 +28,7 @@
"react-redux": "^9.1.2",
"react-router-dom": "^6.23.1",
"sass": "^1.77.5",
"tldraw": "^2.2.0",
"webm-duration-fix-buffer": "^1.0.0"
"tldraw": "^2.2.0"
},
"devDependencies": {
"@types/react": "^17.0.33",
@ -5044,11 +5043,6 @@
"node": ">=0.10.0"
}
},
"node_modules/ebml-block": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/ebml-block/-/ebml-block-1.1.2.tgz",
"integrity": "sha512-HgNlIsRFP6D9VKU5atCeHRJY7XkJP8bOe8yEhd8NB7B3b4++VWTyauz6g650iiPmLfPLGlVpoJmGSgMfXDYusg=="
},
"node_modules/ejs": {
"version": "3.1.10",
"resolved": "https://registry.npmmirror.com/ejs/-/ejs-3.1.10.tgz",
@ -5829,14 +5823,6 @@
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.1.tgz",
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
},
"node_modules/events": {
"version": "3.3.0",
"resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"engines": {
"node": ">=0.8.x"
}
},
"node_modules/eventsource": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/eventsource/-/eventsource-2.0.2.tgz",
@ -7343,14 +7329,6 @@
"resolved": "https://registry.npmmirror.com/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
"node_modules/int64-buffer": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/int64-buffer/-/int64-buffer-1.0.1.tgz",
"integrity": "sha512-+3azY4pXrjAupJHU1V9uGERWlhoqNswJNji6aD/02xac7oxol508AsMC5lxKhEqyZeDFy3enq5OGWXF4u75hiw==",
"engines": {
"node": ">= 4.5.0"
}
},
"node_modules/into-stream": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/into-stream/-/into-stream-3.1.0.tgz",
@ -11999,17 +11977,6 @@
"resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/webm-duration-fix-buffer": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/webm-duration-fix-buffer/-/webm-duration-fix-buffer-1.0.0.tgz",
"integrity": "sha512-y6+5MJxduGp8uoclwzbnCEpNtO9gscj39BSQwdyqDk66q9a+vb5fWhxwR5JmMhWCGlZLbP4O/p29mxjbMGPt+A==",
"dependencies": {
"buffer": "^6.0.3",
"ebml-block": "^1.1.2",
"events": "^3.3.0",
"int64-buffer": "^1.0.1"
}
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz",
@ -15776,11 +15743,6 @@
}
}
},
"ebml-block": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/ebml-block/-/ebml-block-1.1.2.tgz",
"integrity": "sha512-HgNlIsRFP6D9VKU5atCeHRJY7XkJP8bOe8yEhd8NB7B3b4++VWTyauz6g650iiPmLfPLGlVpoJmGSgMfXDYusg=="
},
"ejs": {
"version": "3.1.10",
"resolved": "https://registry.npmmirror.com/ejs/-/ejs-3.1.10.tgz",
@ -16303,11 +16265,6 @@
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.1.tgz",
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
},
"events": {
"version": "3.3.0",
"resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="
},
"eventsource": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/eventsource/-/eventsource-2.0.2.tgz",
@ -17468,11 +17425,6 @@
"resolved": "https://registry.npmmirror.com/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
"int64-buffer": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/int64-buffer/-/int64-buffer-1.0.1.tgz",
"integrity": "sha512-+3azY4pXrjAupJHU1V9uGERWlhoqNswJNji6aD/02xac7oxol508AsMC5lxKhEqyZeDFy3enq5OGWXF4u75hiw=="
},
"into-stream": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/into-stream/-/into-stream-3.1.0.tgz",
@ -20950,17 +20902,6 @@
"resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"webm-duration-fix-buffer": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/webm-duration-fix-buffer/-/webm-duration-fix-buffer-1.0.0.tgz",
"integrity": "sha512-y6+5MJxduGp8uoclwzbnCEpNtO9gscj39BSQwdyqDk66q9a+vb5fWhxwR5JmMhWCGlZLbP4O/p29mxjbMGPt+A==",
"requires": {
"buffer": "^6.0.3",
"ebml-block": "^1.1.2",
"events": "^3.3.0",
"int64-buffer": "^1.0.1"
}
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz",

View File

@ -43,8 +43,7 @@
"react-redux": "^9.1.2",
"react-router-dom": "^6.23.1",
"sass": "^1.77.5",
"tldraw": "^2.2.0",
"webm-duration-fix-buffer": "^1.0.0"
"tldraw": "^2.2.0"
},
"devDependencies": {
"@types/react": "^17.0.33",
@ -103,7 +102,7 @@
"deleteAppDataOnUninstall": true,
"shortcutName": "智汇享",
"allowElevation": true,
"perMachine": true
"perMachine":true
}
}
}
}

View File

@ -472,12 +472,10 @@ const User: React.FC = () => {
onClick={() => {
const file = document.createElement("input") as any;
file.type = "file";
// file.accept = ".xls,.xlsx";
file.accept = ".xls,.xlsx";
file.onchange = async () => {
const setting = await JSON.parse(storage.getItem('setting') as string)
const fileInfo = file.files[0];
console.log(fileInfo);
return
const formData = new FormData();
formData.append("file", fileInfo);
await PostUserImport(formData).then(res => {

View File

@ -21,7 +21,6 @@ import StupWizard from '@/components/StupWizard';
import EquipmentManagement from '@/components/EquipmentManagement';
import UserVideo from '@/components/UserVideo';
import { role } from '@/config/role';
import { fixWebmDuration } from "webm-duration-fix-buffer";
const { confirm } = Modal;
const { exec } = require('child_process');
const fs = require('fs').promises;
@ -540,13 +539,15 @@ const Meeting: React.FC = () => {
useEffect(() => {
if (recorder) {
recorder.start();
recorder.ondataavailable = async (event: any) => {
const blob = await fixWebmDuration(event.data);
recorder.ondataavailable = (event: any) => {
const blob = new Blob([event.data], {
type: 'video/mp4',
});
const reader = new FileReader() as any;
reader.onload = async () => {
const setting = await JSON.parse(storage.getItem('setting') as string)
const buffer = Buffer.from(reader.result);
await fs.writeFile(`${setting.recordingFilesPath}会议录制_${state.roomName}_${state.channelId}_${+new Date()}.webm`, buffer, {});
await fs.writeFile(`${setting.recordingFilesPath}会议录制_${state.roomName}_${state.channelId}_${+new Date()}.mp4`, buffer, {});
confirm({
title: '提示',
icon: <ExclamationCircleFilled />,
@ -1059,12 +1060,12 @@ const Meeting: React.FC = () => {
// 合并音频流与视频流
const combinedSource = new MediaStream([...stream.getVideoTracks(), ...systemSoundDestination.stream.getAudioTracks()]);
// 开始录制
const mediaRecorder = new MediaRecorder(combinedSource, {
const recorder = new MediaRecorder(combinedSource, {
mimeType: 'video/webm;codecs=vp9,opus',
videoBitsPerSecond: 1.5e6,
});
setMediaStream(combinedSource);
setRecorder(mediaRecorder);
setRecorder(recorder);
});
} catch (error: any) {
if (error.code === 'ENOENT') {