[*] 日常优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.acgist.taoyao.signal.party.media;
|
package com.acgist.taoyao.signal.party.media;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@@ -33,4 +34,13 @@ public class RoomClientId {
|
|||||||
@Schema(title = "视频消费者ID", description = "视频消费者ID")
|
@Schema(title = "视频消费者ID", description = "视频消费者ID")
|
||||||
private List<String> videoConsumers;
|
private List<String> videoConsumers;
|
||||||
|
|
||||||
|
public RoomClientId() {
|
||||||
|
this.dataProducers = new ArrayList<>();
|
||||||
|
this.dataConsumers = new ArrayList<>();
|
||||||
|
this.audioProducers = new ArrayList<>();
|
||||||
|
this.videoProducers = new ArrayList<>();
|
||||||
|
this.audioConsumers = new ArrayList<>();
|
||||||
|
this.videoConsumers = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ public class RoomClientListProtocol extends ProtocolRoomAdapter implements Appli
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(String clientId, ClientType clientType, Room room, Client client, Client mediaClient, Message message, Map<String, Object> body) {
|
public void execute(String clientId, ClientType clientType, Room room, Client client, Client mediaClient, Message message, Map<String, Object> body) {
|
||||||
message.setBody(room.clientStatus());
|
message.setBody(Map.of(
|
||||||
client.push(this.build(Map.of(
|
|
||||||
Constant.ROOM_ID, room.getRoomId(),
|
Constant.ROOM_ID, room.getRoomId(),
|
||||||
Constant.CLIENTS, room.clientStatus()
|
Constant.CLIENTS, room.clientStatus()
|
||||||
)));
|
));
|
||||||
|
client.push(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user