[*] 信令+设置布局

This commit is contained in:
acgist
2023-03-26 12:42:29 +08:00
parent 1fb36da847
commit 4b706478d1
35 changed files with 656 additions and 289 deletions

View File

@@ -15,6 +15,7 @@ public enum ClientType {
WEB("Web"),
MEDIA("媒体服务"),
CAMERA("摄像头"),
MOBILE("移动端"),
OTHER("其他终端");
/**
@@ -26,32 +27,11 @@ public enum ClientType {
this.name = name;
}
/**
* @return 是否是Web
*/
public boolean web() {
return this == WEB;
}
/**
* @return 是否是媒体服务
*/
public boolean media() {
return this == MEDIA;
}
/**
* @return 是否是摄像头
*/
public boolean camera() {
return this == CAMERA;
}
/**
* @return 是否是媒体终端
*/
public boolean mediaClient() {
return this == WEB || this == CAMERA;
return this == WEB || this == CAMERA || this == MOBILE;
}
/**

View File

@@ -57,7 +57,7 @@ public class RoomCreateProtocol extends ProtocolClientAdapter implements Applica
@Override
public void execute(String clientId, ClientType clientType, Client client, Message message, Map<String, Object> body) {
if(clientType.web()) {
if(clientType.mediaClient()) {
// WEB同步创建房间
final Room room = this.roomManager.create(
MapUtils.get(body, Constant.NAME),