Compare commits
No commits in common. "9c7f5cd59b4fc41bc92721301efbb77fa39b9b54" and "2777fad3ee5e8bf2cfd6927280ceeeec08f15e0f" have entirely different histories.
9c7f5cd59b
...
2777fad3ee
|
|
@ -153,7 +153,7 @@ const Index: React.FC = () => {
|
|||
<Operation></Operation>
|
||||
</div>
|
||||
<div className={styles.indexBtns}>
|
||||
{user?.roleId === '1' ? <Button type="primary"
|
||||
{user.roleId === '1' ? <Button type="primary"
|
||||
icon={<img src={ImageUrl.icon8} alt="" />}
|
||||
className='m-ant-btn drag'
|
||||
onClick={() => {
|
||||
|
|
|
|||
|
|
@ -91,9 +91,9 @@ const Home: React.FC = () => {
|
|||
<div className={styles.homeLeft}>
|
||||
<div className='drag'>
|
||||
<div>
|
||||
<Avatar name={userInfo?.userName} />
|
||||
<Avatar name={userInfo.userName} />
|
||||
</div>
|
||||
<span>欢迎您,{userInfo?.userName}</span>
|
||||
<span>欢迎您,{userInfo.userName}</span>
|
||||
</div>
|
||||
<div>
|
||||
<img src={ImageUrl.icon14} alt="" />
|
||||
|
|
|
|||
|
|
@ -550,6 +550,7 @@ const Meeting: React.FC = () => {
|
|||
reader.onload = async () => {
|
||||
try {
|
||||
const userDataPath = await ipcRenderer.invoke('get-user-data-path');
|
||||
|
||||
// 获取当前日期并格式化
|
||||
const date = new Date();
|
||||
const year = date.getFullYear();
|
||||
|
|
@ -558,21 +559,36 @@ const Meeting: React.FC = () => {
|
|||
const hours = date.getHours();
|
||||
const minutes = date.getMinutes();
|
||||
const formattedDate = `${year}年${month}月${day}日${hours}时${minutes}分`;
|
||||
|
||||
|
||||
const setting = await JSON.parse(storage.getItem('setting') as string)
|
||||
const buffer = Buffer.from(reader.result);
|
||||
const mp4Path=`${setting.recordingFilesPath}会议录制_${state.roomName}_${state.channelId}_${formattedDate}_beforehanlder.mp4`;
|
||||
await fs.writeFile(mp4Path, buffer);
|
||||
|
||||
// 获取应用程序安装路径
|
||||
const ffmpegPath = path.join(userDataPath, "ffmpeg.exe");
|
||||
|
||||
const inputFilePath = mp4Path; // 输入文件路径
|
||||
const outputFilePath = mp4Path.replace('_beforehanlder',''); // 输出文件路径
|
||||
const command = `${ffmpegPath} -i "${inputFilePath}" -vcodec copy -acodec copy "${outputFilePath}"`;
|
||||
exec(command, (error: any, _stdout: any, _stderr: any) => {
|
||||
|
||||
exec(command, (error:any, stdout:any, stderr:any) => {
|
||||
if (error) {
|
||||
console.error('Error executing ffmpeg command:', error);
|
||||
return;
|
||||
}
|
||||
|
||||
// 删除输入文件
|
||||
fs.unlink(inputFilePath);
|
||||
fs.unlink(inputFilePath, (err:any) => {
|
||||
if (err) {
|
||||
console.error('Error deleting input file:', err);
|
||||
} else {
|
||||
console.log('Input file deleted successfully.');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
confirm({
|
||||
title: '提示',
|
||||
icon: <ExclamationCircleFilled />,
|
||||
|
|
@ -591,11 +607,14 @@ const Meeting: React.FC = () => {
|
|||
onCancel() {
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('处理录制时出错:', err);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
reader.readAsArrayBuffer(blob);
|
||||
}
|
||||
};
|
||||
|
|
@ -621,6 +640,8 @@ const Meeting: React.FC = () => {
|
|||
});
|
||||
const observerObject = new IntersectionObserver(async (entries: IntersectionObserverEntry[], _observer: IntersectionObserver) => {
|
||||
entries.forEach(async (entry) => {
|
||||
console.log(entry.isIntersecting,entry.target.id);
|
||||
|
||||
if (entry.target.id !== user.uid) {
|
||||
await agora.muteRemoteVideoStreamEx(Number(entry.target.id), !entry.isIntersecting)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue