录制视频

This commit is contained in:
yj 2024-07-16 15:29:24 +08:00
parent cb6a89ac9f
commit 18e9e1bbb0
2 changed files with 4 additions and 4 deletions

View File

@ -260,7 +260,7 @@ const Meeting: React.FC = () => {
footerListTemplate[itemIndex][rowIndex].title = '录制中' footerListTemplate[itemIndex][rowIndex].title = '录制中'
footerListTemplate[itemIndex][rowIndex].active = true footerListTemplate[itemIndex][rowIndex].active = true
setFooterList(footerListTemplate) setFooterList(footerListTemplate)
agora.startRecording() agora.startRecording(Number(currentVideoId))
} }
break; break;
case '录制中': case '录制中':
@ -422,7 +422,7 @@ const Meeting: React.FC = () => {
<div className={`${styles.meetingContentSwiper} drag`}> <div className={`${styles.meetingContentSwiper} drag`}>
{roomUserList.map((item: any, index: number) => {roomUserList.map((item: any, index: number) =>
<div <div
className={`${styles.meetingContentSwiperCard} ${user.account === currentVideoId ? styles.active : ''}`} className={`${styles.meetingContentSwiperCard} ${item.account === currentVideoId ? styles.active : ''}`}
key={index} key={index}
onClick={() => { onClick={() => {
setCurrentVideoId(item.account) setCurrentVideoId(item.account)

View File

@ -205,10 +205,10 @@ const agora = {
iMediaRecorder = "" iMediaRecorder = ""
}, },
// 开始录制音视频 // 开始录制音视频
startRecording: () => { startRecording: (uid:number) => {
iMediaRecorder = rtcEngine.createMediaRecorder({ iMediaRecorder = rtcEngine.createMediaRecorder({
channelId: option.channelId, channelId: option.channelId,
uid: 123, uid,
}) })
iMediaRecorder.setMediaRecorderObserver({ iMediaRecorder.setMediaRecorderObserver({
// 录制状态发生改变回调。 // 录制状态发生改变回调。