[*] 信令+设置布局
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user