2
0
فهرست منبع

🐛 fix(classroom): 修复课堂中用户上下线提示频繁问题

- 注释掉用户上下线时的showMessage提示,避免课堂内频繁弹窗干扰教学
- 保留console.log用于调试,不影响正常教学体验
yourname 6 ماه پیش
والد
کامیت
79a0f68ae1
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/client/mobile/components/Classroom/useClassroom.ts

+ 2 - 2
src/client/mobile/components/Classroom/useClassroom.ts

@@ -345,12 +345,12 @@ export const useClassroom = ({ user }:{ user : User }) => {
     showMessage('注册rtc事件监听')
     showMessage('注册rtc事件监听')
 
 
     aliRtcEngine.current.on('remoteUserOnLineNotify', (userId: string) => {
     aliRtcEngine.current.on('remoteUserOnLineNotify', (userId: string) => {
-      showMessage(`用户 ${userId} 加入课堂`);
+      // showMessage(`用户 ${userId} 加入课堂`);
       console.log('用户上线通知:', userId);
       console.log('用户上线通知:', userId);
     });
     });
 
 
     aliRtcEngine.current.on('remoteUserOffLineNotify', (userId: string) => {
     aliRtcEngine.current.on('remoteUserOffLineNotify', (userId: string) => {
-      showMessage(`用户 ${userId} 离开课堂`);
+      // showMessage(`用户 ${userId} 离开课堂`);
       console.log('用户下线通知:', userId);
       console.log('用户下线通知:', userId);
       removeRemoteVideo(userId, 'camera');
       removeRemoteVideo(userId, 'camera');
       removeRemoteVideo(userId, 'screen');
       removeRemoteVideo(userId, 'screen');