call-live-sdk1 0.0.33 → 0.0.34
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
|
@@ -290682,20 +290682,25 @@ const WaitingUserList = ({
|
|
|
290682
290682
|
waitingUsers
|
|
290683
290683
|
}) => {
|
|
290684
290684
|
const {
|
|
290685
|
-
|
|
290685
|
+
updateCallUser,
|
|
290686
290686
|
getter,
|
|
290687
290687
|
kickRoomUser
|
|
290688
290688
|
} = useCallStore();
|
|
290689
290689
|
const handleAdmitUser = (userId) => {
|
|
290690
290690
|
var _a2;
|
|
290691
|
+
updateCallUser(userId, {
|
|
290692
|
+
waiting_mode_state: WaitingModeState.ADMITTED
|
|
290693
|
+
});
|
|
290694
|
+
const latestCallUsers = getter().callUsers;
|
|
290691
290695
|
(_a2 = getter().rtc) == null ? void 0 : _a2.engine.sendRoomMessage(JSON.stringify({
|
|
290692
290696
|
type: "waiting_mode",
|
|
290693
290697
|
data: {
|
|
290694
290698
|
rtc_userid: userId,
|
|
290695
290699
|
waiting_mode_state: WaitingModeState.ADMITTED,
|
|
290696
|
-
users:
|
|
290700
|
+
users: latestCallUsers.map((user) => ({
|
|
290697
290701
|
rtc_userid: user.rtc_userid,
|
|
290698
|
-
|
|
290702
|
+
// 如果是当前准入的用户,使用最新的 ADMITTED 状态
|
|
290703
|
+
waiting_mode_state: user.rtc_userid === userId ? WaitingModeState.ADMITTED : user.waiting_mode_state
|
|
290699
290704
|
}))
|
|
290700
290705
|
}
|
|
290701
290706
|
}));
|
|
@@ -301811,9 +301816,17 @@ const useRoomMessageHandler = (params = {}) => {
|
|
|
301811
301816
|
console.log("处理用户变更消息", {
|
|
301812
301817
|
user,
|
|
301813
301818
|
users,
|
|
301814
|
-
action
|
|
301819
|
+
action,
|
|
301820
|
+
senderId: userid
|
|
301815
301821
|
});
|
|
301816
301822
|
try {
|
|
301823
|
+
if (action === "confirm" && (user == null ? void 0 : user.waiting_mode_state) === WaitingModeState.ADMITTED) {
|
|
301824
|
+
console.log(`[准入确认] 用户 ${userid} 确认准入`);
|
|
301825
|
+
updateCallUser(userid, {
|
|
301826
|
+
waiting_mode_state: WaitingModeState.ADMITTED
|
|
301827
|
+
});
|
|
301828
|
+
return;
|
|
301829
|
+
}
|
|
301817
301830
|
if (user) {
|
|
301818
301831
|
updateCallUser(userid, {
|
|
301819
301832
|
...user
|
|
@@ -301846,7 +301859,7 @@ const useRoomMessageHandler = (params = {}) => {
|
|
|
301846
301859
|
userid
|
|
301847
301860
|
});
|
|
301848
301861
|
}
|
|
301849
|
-
}, [updateCallUser]);
|
|
301862
|
+
}, [updateCallUser, callConfig.rtc_userid]);
|
|
301850
301863
|
const handleChangeMediaMessage = reactExports.useCallback((data2, userid) => {
|
|
301851
301864
|
var _a2;
|
|
301852
301865
|
const mediaData = data2.data;
|