|
|
@@ -323,7 +323,7 @@ export const ClassroomPage = () => {
|
|
|
channelId: string
|
|
|
) => {
|
|
|
console.log(`视频订阅状态变化: 用户 ${userId}, 旧状态 ${oldState}, 新状态 ${newState}`);
|
|
|
-
|
|
|
+
|
|
|
switch(newState) {
|
|
|
case 3: // 订阅成功
|
|
|
try {
|
|
|
@@ -378,6 +378,18 @@ export const ClassroomPage = () => {
|
|
|
console.warn(`未知订阅状态: ${newState}`);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+ // 订阅屏幕分享流状态变化
|
|
|
+ aliRtcEngine.current.on('screenShareSubscribeStateChanged', (
|
|
|
+ userId: string,
|
|
|
+ oldState: AliRtcSubscribeState,
|
|
|
+ newState: AliRtcSubscribeState,
|
|
|
+ elapseSinceLastState: number,
|
|
|
+ channel: string
|
|
|
+ ) => {
|
|
|
+ console.log(`屏幕分享订阅状态变更:uid=${userId}, oldState=${oldState}, newState=${newState}`);
|
|
|
+ })
|
|
|
};
|
|
|
|
|
|
// 获取学生列表
|