【m】开发完成
This commit is contained in:
@@ -97,6 +97,8 @@ namespace Unity.RenderStreaming
|
||||
public override void DeleteConnection(string connectionId)
|
||||
{
|
||||
// 清理所有Participant连接
|
||||
// 注意:不能在这里调用 base.DeleteConnection(participantId),否则会给每个Participant发送disconnect,
|
||||
// 导致服务器返回多次通知。应该只发一次disconnect关闭房间,Participant的清理由服务器通知触发。
|
||||
foreach (var participantId in participantIds.ToList())
|
||||
{
|
||||
DisconnectParticipant(participantId);
|
||||
@@ -152,10 +154,10 @@ namespace Unity.RenderStreaming
|
||||
if (m_participantStreams.TryGetValue(participantId, out var ps))
|
||||
{
|
||||
// 移除Sender关联
|
||||
foreach (var sender in streams.OfType<IStreamSender>())
|
||||
{
|
||||
RemoveSender(participantId, sender);
|
||||
}
|
||||
// foreach (var sender in streams.OfType<IStreamSender>())
|
||||
// {
|
||||
// RemoveSender(participantId, sender);
|
||||
// }
|
||||
// 移除Receiver关联
|
||||
if (ps.videoReceiver != null)
|
||||
RemoveReceiver(participantId, ps.videoReceiver);
|
||||
|
||||
Reference in New Issue
Block a user