2026-04-28 16:48:04 +08:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Unity.RenderStreaming
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 0649
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class DescData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public string sdp;
|
|
|
|
|
public bool polite;
|
|
|
|
|
public DateTime dateTime;
|
2026-04-29 15:13:24 +08:00
|
|
|
public string participantId;
|
2026-04-28 16:48:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class CandidateData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public string participantId;
|
|
|
|
|
public string candidate;
|
|
|
|
|
public string sdpMid;
|
|
|
|
|
public int sdpMLineIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class SignalingMessage
|
|
|
|
|
{
|
|
|
|
|
public string status;
|
|
|
|
|
public string message;
|
|
|
|
|
public string sessionId;
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public string participantId;
|
|
|
|
|
public bool polite;
|
|
|
|
|
public string sdp;
|
|
|
|
|
public string type;
|
|
|
|
|
public string candidate;
|
|
|
|
|
public string sdpMid;
|
|
|
|
|
public int sdpMLineIndex;
|
2026-04-29 15:13:24 +08:00
|
|
|
public string role;
|
|
|
|
|
public string reason;
|
|
|
|
|
public string data;
|
2026-04-28 16:48:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class RoutedMessage<T>
|
|
|
|
|
{
|
|
|
|
|
public string from;
|
|
|
|
|
public string to;
|
|
|
|
|
public string type;
|
|
|
|
|
public string participantId;
|
|
|
|
|
public T data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class OpenSessionData
|
|
|
|
|
{
|
|
|
|
|
public string sessionId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class CreateConnectionResData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public bool polite;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class DestroyConnectionResData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class ConnectionResDataList
|
|
|
|
|
{
|
|
|
|
|
public DescData[] connections;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class OfferResDataList
|
|
|
|
|
{
|
|
|
|
|
public DescData[] offers;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class AnswerResDataList
|
|
|
|
|
{
|
|
|
|
|
public DescData[] answers;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class CandidateContainerResDataList
|
|
|
|
|
{
|
|
|
|
|
public CandidateContainerResData[] candidates;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class CandidateContainerResData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public CandidateData[] candidates;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
class AllResData
|
|
|
|
|
{
|
|
|
|
|
public SignalingMessage[] messages;
|
|
|
|
|
public string datetime;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-29 15:13:24 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// 参与者加入/离开事件数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class ParticipantEventData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public string participantId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 呼叫请求数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class CallRequestData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public string data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 自定义消息数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class OnMessageData
|
|
|
|
|
{
|
|
|
|
|
public string connectionId;
|
|
|
|
|
public string participantId;
|
|
|
|
|
public string message;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-28 16:48:04 +08:00
|
|
|
#pragma warning restore 0649
|
|
|
|
|
}
|