using System;
using System.Collections.Generic;
using Unity.WebRTC;
namespace Unity.RenderStreaming
{
public interface IRenderStreamingDelegate
{
///
///
///
event Action onStart;
///
///
///
event Action onCreatedConnection;
///
///
///
event Action onDeletedConnection;
///
///
///
event Action onGotOffer;
///
///
///
event Action onGotAnswer;
///
///
///
event Action onConnect;
///
///
///
event Action onDisconnect;
///
///
///
event Action onAddTransceiver;
///
///
///
event Action onAddChannel;
///
/// 参与者加入事件 (connectionId, participantId)
///
event Action onParticipantJoined;
///
/// 参与者离开事件 (connectionId, participantId)
///
event Action onParticipantLeft;
///
/// 呼叫请求事件 (connectionId, data)
///
event Action onCallRequest;
///
/// 自定义消息事件 (connectionId, participantId, message)
///
event Action onMessage;
}
public interface IRenderStreamingHandler
{
///
///
///
///
void CreateConnection(string connectionId);
///
///
///
///
void DeleteConnection(string connectionId);
///
///
///
///
///
bool ExistConnection(string connectionId);
///
///
///
///
///
bool IsConnected(string connectionId);
///
///
///
///
///
bool IsStable(string connection);
///
///
///
///
///
///
RTCDataChannel CreateChannel(string connectionId, string label = null);
///
///
///
///
void SendOffer(string connectionId);
///
///
///
///
void SendAnswer(string connectionId);
///
///
///
///
///
///
///
RTCRtpTransceiver AddTransceiver(string connectionId, MediaStreamTrack track, RTCRtpTransceiverInit init = null);
///
///
///
///
///
///
///
RTCRtpTransceiver AddTransceiver(string connectionId, TrackKind kind, RTCRtpTransceiverInit init = null);
///
///
///
///
///
void RemoveSenderTrack(string connectionId, MediaStreamTrack track);
///
///
///
///
///
IEnumerable GetTransceivers(string connectionId);
}
}