call-live-sdk1 0.0.31 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/call-live-sdk.es.js
CHANGED
|
@@ -202796,8 +202796,8 @@ const useVideoSlotBinding = ({
|
|
|
202796
202796
|
return;
|
|
202797
202797
|
}
|
|
202798
202798
|
const [, streamIndex = "main"] = selectedValue.split(fenge);
|
|
202799
|
-
if (!targetUser || streamIndex === "screen" && !targetUser.isScreenEnabled) {
|
|
202800
|
-
console.log(`用户${item.userId}
|
|
202799
|
+
if (!targetUser || streamIndex === "screen" && !targetUser.isScreenEnabled || targetUser.waiting_mode_state === WaitingModeState.WAITING) {
|
|
202800
|
+
console.log(`用户${item.userId}已退出或被移至等候状态,恢复为空连麦嘉宾`);
|
|
202801
202801
|
setSelectedValue("");
|
|
202802
202802
|
try {
|
|
202803
202803
|
livePlayerRef.current.addEmptyVideoSlot({ id: item.id });
|
|
@@ -301593,7 +301593,7 @@ const useRoomMessageHandler = (params = {}) => {
|
|
|
301593
301593
|
case "leave":
|
|
301594
301594
|
return `${type4}`;
|
|
301595
301595
|
case "waiting_mode":
|
|
301596
|
-
return `${type4}_${(data2 == null ? void 0 : data2.rtc_userid) || userId}_${(data2 == null ? void 0 : data2.waiting_mode_state) || "unknown"}`;
|
|
301596
|
+
return `${type4}_${(data2 == null ? void 0 : data2.rtc_userid) || userId}_${(data2 == null ? void 0 : data2.waiting_mode_state) || "unknown"}_${Date.now()}`;
|
|
301597
301597
|
case "change_user":
|
|
301598
301598
|
return `${type4}_${userId}_${(data2 == null ? void 0 : data2.action) || "unknown"}`;
|
|
301599
301599
|
case "media":
|
|
@@ -301720,16 +301720,33 @@ const useRoomMessageHandler = (params = {}) => {
|
|
|
301720
301720
|
}
|
|
301721
301721
|
if (waiting_mode_state === WaitingModeState.ADMITTED) {
|
|
301722
301722
|
console.log("收到准入消息", waitingData);
|
|
301723
|
-
|
|
301723
|
+
let userFoundInArray = false;
|
|
301724
|
+
if (users && Array.isArray(users)) {
|
|
301724
301725
|
users.forEach((user) => {
|
|
301725
301726
|
if (user.rtc_userid === rtc_userid) {
|
|
301726
301727
|
user.waiting_mode_state = waiting_mode_state;
|
|
301728
|
+
userFoundInArray = true;
|
|
301729
|
+
console.log("在 users 数组中找到目标用户,更新状态", user);
|
|
301727
301730
|
}
|
|
301728
301731
|
if (user.rtc_userid) {
|
|
301729
301732
|
updateCallUser(user.rtc_userid, user);
|
|
301730
301733
|
}
|
|
301731
301734
|
});
|
|
301732
301735
|
}
|
|
301736
|
+
if (!userFoundInArray) {
|
|
301737
|
+
console.warn("users 数组中未找到目标用户,直接使用消息数据更新状态", {
|
|
301738
|
+
rtc_userid,
|
|
301739
|
+
waiting_mode_state,
|
|
301740
|
+
users
|
|
301741
|
+
});
|
|
301742
|
+
updateCallUser(rtc_userid, {
|
|
301743
|
+
waiting_mode_state: WaitingModeState.ADMITTED
|
|
301744
|
+
});
|
|
301745
|
+
console.log("已直接更新用户状态为 ADMITTED", {
|
|
301746
|
+
rtc_userid,
|
|
301747
|
+
waiting_mode_state: WaitingModeState.ADMITTED
|
|
301748
|
+
});
|
|
301749
|
+
}
|
|
301733
301750
|
}
|
|
301734
301751
|
} catch (error2) {
|
|
301735
301752
|
console.error("处理等候模式消息失败", {
|
|
@@ -304978,7 +304995,7 @@ const UserVideoContainer = reactExports.memo(({
|
|
|
304978
304995
|
noMirror,
|
|
304979
304996
|
shouldMirror: +!noMirror
|
|
304980
304997
|
});
|
|
304981
|
-
const isModeFit = user.rtc_userid === callConfig.drawing_board_id || (videoId == null ? void 0 : videoId.includes("screen")) || user.device === "pc";
|
|
304998
|
+
const isModeFit = user.rtc_userid === callConfig.drawing_board_id || (videoId == null ? void 0 : videoId.includes("screen")) || user.device === "pc" || videoId.includes("self");
|
|
304982
304999
|
window.log.push({
|
|
304983
305000
|
com: "UserVideoContainer",
|
|
304984
305001
|
params: {
|