fix: 修改直播和监控逻辑
This commit is contained in:
parent
3c70e1d05b
commit
3bfb7c467b
@ -227,12 +227,14 @@ export const syncStudentScreenShareState = async (state: unknown) => {
|
||||
}
|
||||
|
||||
const sessionKey = getMonitorSessionKey(msg)
|
||||
if (monitorState === 1 && sessionKey && monitorSessionId === sessionKey) {
|
||||
|
||||
// 已在监控中:仅刷新连接参数,不先 stop 再 start(与老师 screenShareState 同步一致)
|
||||
if (monitorState === 1) {
|
||||
if (sessionKey) monitorSessionId = sessionKey
|
||||
applyStudentShareStart(msg)
|
||||
return
|
||||
}
|
||||
|
||||
stopClassMonitor()
|
||||
monitorSessionId = sessionKey
|
||||
monitorState = 1
|
||||
if (!applyStudentShareStart(msg)) {
|
||||
|
||||
@ -123,7 +123,8 @@ export const userStore = defineStore('user', () => {
|
||||
system.value.isLock = info.lockFlag === 0
|
||||
}
|
||||
|
||||
if (hasMonitorState) {
|
||||
// 有 studentScreenShareState 时以其为准,避免与旧 monitorState 重复 stop/start
|
||||
if (hasMonitorState && !hasStudentScreenShareState) {
|
||||
syncClassMonitorState(info)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user