[*] 日常优化
This commit is contained in:
@@ -453,6 +453,9 @@ class Taoyao {
|
|||||||
case "media::producer::resume":
|
case "media::producer::resume":
|
||||||
me.mediaProducerResume(message, body);
|
me.mediaProducerResume(message, body);
|
||||||
break;
|
break;
|
||||||
|
case "media::producer::status":
|
||||||
|
me.mediaProducerStatus(message, body);
|
||||||
|
break;
|
||||||
case "media::router::rtp::capabilities":
|
case "media::router::rtp::capabilities":
|
||||||
me.mediaRouterRtpCapabilities(message, body);
|
me.mediaRouterRtpCapabilities(message, body);
|
||||||
break;
|
break;
|
||||||
@@ -800,12 +803,20 @@ class Taoyao {
|
|||||||
*/
|
*/
|
||||||
async mediaIceRestart(message, body) {
|
async mediaIceRestart(message, body) {
|
||||||
const me = this;
|
const me = this;
|
||||||
const { roomId, transportId } = body;
|
const {
|
||||||
|
roomId,
|
||||||
|
transportId
|
||||||
|
} = body;
|
||||||
const room = me.rooms.get(roomId);
|
const room = me.rooms.get(roomId);
|
||||||
const transport = room?.transports.get(transportId);
|
const transport = room?.transports.get(transportId);
|
||||||
|
if(transport) {
|
||||||
|
console.debug("重启ICE", transportId);
|
||||||
const iceParameters = await transport.restartIce();
|
const iceParameters = await transport.restartIce();
|
||||||
message.body.iceParameters = iceParameters;
|
message.body.iceParameters = iceParameters;
|
||||||
me.push(message);
|
me.push(message);
|
||||||
|
} else {
|
||||||
|
console.warn("重启ICE(无效)", transportId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -988,6 +999,32 @@ class Taoyao {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产者状态信令
|
||||||
|
*
|
||||||
|
* @param {*} message 信令消息
|
||||||
|
* @param {*} body 消息主体
|
||||||
|
*/
|
||||||
|
async mediaProducerStatus(message, body) {
|
||||||
|
const me = this;
|
||||||
|
const {
|
||||||
|
roomId,
|
||||||
|
producerId,
|
||||||
|
} = body;
|
||||||
|
const room = me.rooms.get(roomId);
|
||||||
|
const producer = room?.producers.get(producerId);
|
||||||
|
if(producer) {
|
||||||
|
console.debug("查询生产者状态", producerId);
|
||||||
|
message.body = {
|
||||||
|
...body,
|
||||||
|
status: await producer.getStats()
|
||||||
|
};
|
||||||
|
me.push(message);
|
||||||
|
} else {
|
||||||
|
console.debug("查询生产者状态(无效)", producerId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消费媒体信令
|
* 消费媒体信令
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -840,6 +840,9 @@ class Taoyao extends RemoteClient {
|
|||||||
case "media::producer::resume":
|
case "media::producer::resume":
|
||||||
me.defaultMediaProducerResume(message);
|
me.defaultMediaProducerResume(message);
|
||||||
break;
|
break;
|
||||||
|
case "media::producer::score":
|
||||||
|
me.defaultMediaProducerScore(message);
|
||||||
|
break;
|
||||||
case "media::video::orientation::change":
|
case "media::video::orientation::change":
|
||||||
me.defaultMediaVideoOrientationChange(message);
|
me.defaultMediaVideoOrientationChange(message);
|
||||||
break;
|
break;
|
||||||
@@ -1461,7 +1464,7 @@ class Taoyao extends RemoteClient {
|
|||||||
*
|
*
|
||||||
* @param {*} consumerId 消费者ID
|
* @param {*} consumerId 消费者ID
|
||||||
*/
|
*/
|
||||||
async mediaConsumerPause(consumerId) {
|
mediaConsumerPause(consumerId) {
|
||||||
const me = this;
|
const me = this;
|
||||||
const consumer = me.consumers.get(consumerId);
|
const consumer = me.consumers.get(consumerId);
|
||||||
if(consumer) {
|
if(consumer) {
|
||||||
@@ -1469,7 +1472,7 @@ class Taoyao extends RemoteClient {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.debug("暂停消费者", consumerId);
|
console.debug("暂停消费者", consumerId);
|
||||||
await me.request(protocol.buildMessage("media::consumer::pause", {
|
me.push(protocol.buildMessage("media::consumer::pause", {
|
||||||
roomId : me.roomId,
|
roomId : me.roomId,
|
||||||
consumerId: consumerId,
|
consumerId: consumerId,
|
||||||
}));
|
}));
|
||||||
@@ -1525,7 +1528,7 @@ class Taoyao extends RemoteClient {
|
|||||||
*
|
*
|
||||||
* @param {*} consumerId 消费者ID
|
* @param {*} consumerId 消费者ID
|
||||||
*/
|
*/
|
||||||
async mediaConsumerResume(consumerId) {
|
mediaConsumerResume(consumerId) {
|
||||||
const me = this;
|
const me = this;
|
||||||
const consumer = me.consumers.get(consumerId);
|
const consumer = me.consumers.get(consumerId);
|
||||||
if(consumer) {
|
if(consumer) {
|
||||||
@@ -1533,7 +1536,7 @@ class Taoyao extends RemoteClient {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.debug("恢复消费者", consumerId);
|
console.debug("恢复消费者", consumerId);
|
||||||
await me.request(protocol.buildMessage("media::consumer::resume", {
|
me.push(protocol.buildMessage("media::consumer::resume", {
|
||||||
roomId : me.roomId,
|
roomId : me.roomId,
|
||||||
consumerId: consumerId,
|
consumerId: consumerId,
|
||||||
}));
|
}));
|
||||||
@@ -1719,6 +1722,29 @@ class Taoyao extends RemoteClient {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重启ICE信令
|
||||||
|
*/
|
||||||
|
async mediaIceRestart() {
|
||||||
|
const me = this;
|
||||||
|
if (me.sendTransport) {
|
||||||
|
const response = await me.request(protocol.buildMessage("media::ice::restart", {
|
||||||
|
roomId : me.roomId,
|
||||||
|
transportId: me.sendTransport.id
|
||||||
|
}));
|
||||||
|
const { iceParameters } = response.body;
|
||||||
|
await me.sendTransport.restartIce({ iceParameters });
|
||||||
|
}
|
||||||
|
if (me.recvTransport) {
|
||||||
|
const response = await me.request(protocol.buildMessage("media::ice::restart", {
|
||||||
|
roomId : me.roomId,
|
||||||
|
transportId: me.recvTransport.id
|
||||||
|
}));
|
||||||
|
const { iceParameters } = response.body;
|
||||||
|
await me.recvTransport.restartIce({ iceParameters });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭生产者信令
|
* 关闭生产者信令
|
||||||
*
|
*
|
||||||
@@ -1740,7 +1766,10 @@ class Taoyao extends RemoteClient {
|
|||||||
*/
|
*/
|
||||||
async defaultMediaProducerClose(message) {
|
async defaultMediaProducerClose(message) {
|
||||||
const me = this;
|
const me = this;
|
||||||
const { roomId, producerId } = message.body;
|
const {
|
||||||
|
roomId,
|
||||||
|
producerId
|
||||||
|
} = message.body;
|
||||||
const producer = me.getProducer(producerId);
|
const producer = me.getProducer(producerId);
|
||||||
if (producer) {
|
if (producer) {
|
||||||
console.debug("关闭生产者", producerId);
|
console.debug("关闭生产者", producerId);
|
||||||
@@ -1785,7 +1814,10 @@ class Taoyao extends RemoteClient {
|
|||||||
*/
|
*/
|
||||||
async defaultMediaProducerPause(message) {
|
async defaultMediaProducerPause(message) {
|
||||||
const me = this;
|
const me = this;
|
||||||
const { roomId, producerId } = message.body;
|
const {
|
||||||
|
roomId,
|
||||||
|
producerId
|
||||||
|
} = message.body;
|
||||||
const producer = me.getProducer(producerId);
|
const producer = me.getProducer(producerId);
|
||||||
if (producer) {
|
if (producer) {
|
||||||
console.debug("暂停生产者", producerId);
|
console.debug("暂停生产者", producerId);
|
||||||
@@ -1824,7 +1856,10 @@ class Taoyao extends RemoteClient {
|
|||||||
*/
|
*/
|
||||||
async defaultMediaProducerResume(message) {
|
async defaultMediaProducerResume(message) {
|
||||||
const me = this;
|
const me = this;
|
||||||
const { roomId, producerId } = message.body;
|
const {
|
||||||
|
roomId,
|
||||||
|
producerId
|
||||||
|
} = message.body;
|
||||||
const producer = me.getProducer(producerId);
|
const producer = me.getProducer(producerId);
|
||||||
if (producer) {
|
if (producer) {
|
||||||
console.debug("恢复生产者", producerId);
|
console.debug("恢复生产者", producerId);
|
||||||
@@ -1834,6 +1869,15 @@ class Taoyao extends RemoteClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 媒体生产者评分信令
|
||||||
|
*
|
||||||
|
* @param {*} message 信令消息
|
||||||
|
*/
|
||||||
|
defaultMediaProducerScore(message) {
|
||||||
|
console.debug("生产者评分", message);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生产者状态信令
|
* 查询生产者状态信令
|
||||||
*
|
*
|
||||||
@@ -1847,27 +1891,6 @@ class Taoyao extends RemoteClient {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 重启ICE信令
|
|
||||||
*/
|
|
||||||
async mediaIceRestart() {
|
|
||||||
const me = this;
|
|
||||||
if (me.sendTransport) {
|
|
||||||
const response = await me.request(protocol.buildMessage('media::ice::restart', {
|
|
||||||
transportId: me.sendTransport.id
|
|
||||||
}));
|
|
||||||
const { iceParameters } = response.body;
|
|
||||||
await me.sendTransport.restartIce({ iceParameters });
|
|
||||||
}
|
|
||||||
if (me.recvTransport) {
|
|
||||||
const response = await me.request(protocol.buildMessage('media::ice::restart', {
|
|
||||||
transportId: me.recvTransport.id
|
|
||||||
}));
|
|
||||||
const { iceParameters } = response;
|
|
||||||
await me.recvTransport.restartIce({ iceParameters });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频方向变化信令
|
* 视频方向变化信令
|
||||||
*
|
*
|
||||||
@@ -2873,29 +2896,6 @@ class Taoyao extends RemoteClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 重启ICE信令
|
|
||||||
*/
|
|
||||||
async restartIce() {
|
|
||||||
const me = this;
|
|
||||||
if (me.sendTransport) {
|
|
||||||
const response = await me.request("media::ice::restart", {
|
|
||||||
roomId : me.roomId,
|
|
||||||
transportId: me.sendTransport.id,
|
|
||||||
});
|
|
||||||
const iceParameters = response.data.iceParameters;
|
|
||||||
await me.sendTransport.restartIce({ iceParameters });
|
|
||||||
}
|
|
||||||
if (me.recvTransport) {
|
|
||||||
const response = await me.request("media::ice::restart", {
|
|
||||||
roomId : me.roomId,
|
|
||||||
transportId: me.recvTransport.id,
|
|
||||||
});
|
|
||||||
const iceParameters = response.data.iceParameters;
|
|
||||||
await me.recvTransport.restartIce({ iceParameters });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起会话
|
* 发起会话
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
"consumerId": "消费者ID"
|
"consumerId": "消费者ID"
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
flow = "终端=>信令服务->媒体服务"
|
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
||||||
)
|
)
|
||||||
public class MediaConsumerPauseProtocol extends ProtocolRoomAdapter implements ApplicationListener<MediaConsumerPauseEvent> {
|
public class MediaConsumerPauseProtocol extends ProtocolRoomAdapter implements ApplicationListener<MediaConsumerPauseEvent> {
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
"consumerId": "消费者ID"
|
"consumerId": "消费者ID"
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
flow = "终端=>信令服务->媒体服务"
|
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
||||||
)
|
)
|
||||||
public class MediaConsumerResumeProtocol extends ProtocolRoomAdapter implements ApplicationListener<MediaConsumerResumeEvent> {
|
public class MediaConsumerResumeProtocol extends ProtocolRoomAdapter implements ApplicationListener<MediaConsumerResumeEvent> {
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
flow = "媒体服务->信令服务->终端"
|
flow = "媒体服务->信令服务+)终端"
|
||||||
)
|
)
|
||||||
public class MediaConsumerScoreProtocol extends ProtocolRoomAdapter {
|
public class MediaConsumerScoreProtocol extends ProtocolRoomAdapter {
|
||||||
|
|
||||||
|
|||||||
@@ -20,19 +20,19 @@ import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
|||||||
body = {
|
body = {
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"roomId": "房间标识",
|
"roomId" : "房间标识",
|
||||||
"transportId": "通道标识"
|
"transportId": "通道标识"
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"roomId": "房间标识",
|
"roomId" : "房间标识",
|
||||||
"transportId": "通道标识",
|
"transportId" : "通道标识",
|
||||||
"iceParameters": "iceParameters"
|
"iceParameters": "iceParameters"
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
},
|
},
|
||||||
flow = "终端=>信令服务->媒体服务->信令服务->终端"
|
flow = "终端=>信令服务->媒体服务"
|
||||||
)
|
)
|
||||||
public class MediaIceRestartProtocol extends ProtocolRoomAdapter {
|
public class MediaIceRestartProtocol extends ProtocolRoomAdapter {
|
||||||
|
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
body = {
|
body = {
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"kind": "媒体类型",
|
"kind" : "媒体类型",
|
||||||
"roomId": "房间标识",
|
"roomId" : "房间标识",
|
||||||
"transportId": "通道标识",
|
"transportId" : "通道标识",
|
||||||
"rtpParameters": "rtpParameters"
|
"rtpParameters": "rtpParameters"
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
},
|
},
|
||||||
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
flow = "终端=>信令服务->媒体服务"
|
||||||
)
|
)
|
||||||
public class MediaProduceProtocol extends ProtocolRoomAdapter {
|
public class MediaProduceProtocol extends ProtocolRoomAdapter {
|
||||||
|
|
||||||
|
|||||||
@@ -27,13 +27,14 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Protocol
|
@Protocol
|
||||||
@Description(
|
@Description(
|
||||||
|
memo = "关闭通过回调实现所以不能同步响应",
|
||||||
body = """
|
body = """
|
||||||
{
|
{
|
||||||
"roomId": "房间ID"
|
"roomId" : "房间ID"
|
||||||
"consumerId": "生产者ID"
|
"consumerId": "生产者ID"
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
flow = "终端->信令服务->媒体服务->信令服务+)终端"
|
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
||||||
)
|
)
|
||||||
public class MediaProducerCloseProtocol extends ProtocolRoomAdapter implements ApplicationListener<MediaProducerCloseEvent> {
|
public class MediaProducerCloseProtocol extends ProtocolRoomAdapter implements ApplicationListener<MediaProducerCloseEvent> {
|
||||||
|
|
||||||
@@ -66,9 +67,8 @@ public class MediaProducerCloseProtocol extends ProtocolRoomAdapter implements A
|
|||||||
if(clientType.mediaClient()) {
|
if(clientType.mediaClient()) {
|
||||||
producer.close();
|
producer.close();
|
||||||
} else if(clientType.mediaServer()) {
|
} else if(clientType.mediaServer()) {
|
||||||
// TODO:路由到真实消费者
|
|
||||||
producer.remove();
|
producer.remove();
|
||||||
room.broadcast(message);
|
producer.getProducerClient().push(message);
|
||||||
} else {
|
} else {
|
||||||
this.logNoAdapter(clientType);
|
this.logNoAdapter(clientType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,17 +16,20 @@ import com.acgist.taoyao.signal.party.media.Producer;
|
|||||||
import com.acgist.taoyao.signal.party.room.Room;
|
import com.acgist.taoyao.signal.party.room.Room;
|
||||||
import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 暂停生产者信令
|
* 暂停生产者信令
|
||||||
*
|
*
|
||||||
* @author acgist
|
* @author acgist
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Protocol
|
@Protocol
|
||||||
@Description(
|
@Description(
|
||||||
body = """
|
body = """
|
||||||
{
|
{
|
||||||
"roomId": "房间ID"
|
"roomId" : "房间ID"
|
||||||
"producerId": "消费者ID"
|
"producerId": "生产者ID"
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
||||||
@@ -52,13 +55,16 @@ public class MediaProducerPauseProtocol extends ProtocolRoomAdapter implements A
|
|||||||
|
|
||||||
@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) {
|
||||||
if(clientType.mediaClient()) {
|
|
||||||
final String producerId = MapUtils.get(body, Constant.PRODUCER_ID);
|
final String producerId = MapUtils.get(body, Constant.PRODUCER_ID);
|
||||||
final Producer producer = room.producer(producerId);
|
final Producer producer = room.producer(producerId);
|
||||||
|
if(producer == null) {
|
||||||
|
log.debug("生产者无效:{} - {}", producerId, clientType);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(clientType.mediaClient()) {
|
||||||
producer.pause();
|
producer.pause();
|
||||||
} else if(clientType.mediaServer()) {
|
} else if(clientType.mediaServer()) {
|
||||||
// TODO:路由到真实消费者
|
producer.getProducerClient().push(message);
|
||||||
room.broadcast(message);
|
|
||||||
} else {
|
} else {
|
||||||
this.logNoAdapter(clientType);
|
this.logNoAdapter(clientType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,17 +16,20 @@ import com.acgist.taoyao.signal.party.media.Producer;
|
|||||||
import com.acgist.taoyao.signal.party.room.Room;
|
import com.acgist.taoyao.signal.party.room.Room;
|
||||||
import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 恢复生产者信令
|
* 恢复生产者信令
|
||||||
*
|
*
|
||||||
* @author acgist
|
* @author acgist
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Protocol
|
@Protocol
|
||||||
@Description(
|
@Description(
|
||||||
body = """
|
body = """
|
||||||
{
|
{
|
||||||
"roomId": "房间ID"
|
"roomId" : "房间ID"
|
||||||
"producerId": "消费者ID"
|
"producerId": "生产者ID"
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
flow = "终端->信令服务->媒体服务->信令服务->终端"
|
||||||
@@ -52,13 +55,16 @@ public class MediaProducerResumeProtocol extends ProtocolRoomAdapter implements
|
|||||||
|
|
||||||
@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) {
|
||||||
if(clientType.mediaClient()) {
|
|
||||||
final String producerId = MapUtils.get(body, Constant.PRODUCER_ID);
|
final String producerId = MapUtils.get(body, Constant.PRODUCER_ID);
|
||||||
final Producer producer = room.producer(producerId);
|
final Producer producer = room.producer(producerId);
|
||||||
|
if(producer == null) {
|
||||||
|
log.debug("生产者无效:{} - {}", producerId, clientType);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(clientType.mediaClient()) {
|
||||||
producer.resume();
|
producer.resume();
|
||||||
} else if(clientType.mediaServer()) {
|
} else if(clientType.mediaServer()) {
|
||||||
// TODO:路由到真实消费者
|
producer.getProducerClient().push(message);
|
||||||
room.broadcast(message);
|
|
||||||
} else {
|
} else {
|
||||||
this.logNoAdapter(clientType);
|
this.logNoAdapter(clientType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,16 @@ import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
|||||||
*/
|
*/
|
||||||
@Protocol
|
@Protocol
|
||||||
@Description(
|
@Description(
|
||||||
flow = "媒体服务->信令服务->终端"
|
body = """
|
||||||
|
{
|
||||||
|
"roomId" : "房间ID"
|
||||||
|
"consumerId": "消费者ID"
|
||||||
|
"score" : {
|
||||||
|
...生产者评分
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""",
|
||||||
|
flow = "媒体服务->信令服务+)终端"
|
||||||
)
|
)
|
||||||
public class MediaProducerScoreProtocol extends ProtocolRoomAdapter {
|
public class MediaProducerScoreProtocol extends ProtocolRoomAdapter {
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ import com.acgist.taoyao.signal.protocol.ProtocolRoomAdapter;
|
|||||||
@Description(
|
@Description(
|
||||||
body = """
|
body = """
|
||||||
{
|
{
|
||||||
"roomId": "房间ID",
|
"roomId" : "房间ID",
|
||||||
"producerId": "生产者ID"
|
"producerId": "生产者ID"
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
flow = "终端=>信令服务->媒体服务->信令服务->终端"
|
flow = "终端=>信令服务->媒体服务"
|
||||||
)
|
)
|
||||||
public class MediaProducerStatusProtocol extends ProtocolRoomAdapter {
|
public class MediaProducerStatusProtocol extends ProtocolRoomAdapter {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user