This commit is contained in:
77
2024-04-16 02:26:45 +08:00
parent 8f5af2af68
commit e954422abe
3 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ public class AgoreTest {
@Test
public void closeChannel(){
Long roomId = 1779868994539642881L;
Long roomId = 1779938276812283906L;
// List<String> channelUsers = agora.getChannelUsers(roomId);
// System.out.println(JSON.toJSONString(channelUsers));
agora.closeChannel(roomId);

View File

@@ -67,7 +67,7 @@ public class Agora {
String url = "https://api.sd-rtn.com/dev/v1/kicking-rule";
Map<String,Object> bodyData = new HashMap<>();
bodyData.put("appid",agoraProperties.getAppId());
bodyData.put("cname",roomId);
bodyData.put("cname",roomId+"");
bodyData.put("time",0);
bodyData.put("privileges", Collections.singletonList("join_channel"));
HttpHeaders headers = new HttpHeaders();

View File

@@ -130,7 +130,7 @@ public class RoomWebSocketHandler extends AbstractWebSocketHandler {
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {
String token = String.valueOf(session.getAttributes().get("token"));
// TODO 连接关闭 是否要删除fd的关系
WebSocketSessionHolder.removeSession(token);
WebSocketSessionHolder.removeSession(session.getId());
log.info("[disconnect] sessionId: {},token:{}", session.getId(), token);
}