/// <summary> /// /// </summary> /// <param name="track"></param> public virtual void SetReceiver(string connectionId, RTCRtpReceiver receiver) { m_receiver = receiver; Track = m_receiver?.Track; if (m_receiver == null) { OnStoppedStream?.Invoke(connectionId); } else { OnStartedStream?.Invoke(connectionId); } }
/// <summary> /// /// </summary> /// <param name="connectionId"></param> /// <param name="sender"></param> public virtual void SetSender(string connectionId, RTCRtpSender sender) { if (connectionId == null) { throw new ArgumentNullException("connectionId is null"); } if (sender == null) { m_senders.Remove(connectionId); OnStoppedStream?.Invoke(connectionId); } else { m_senders.Add(connectionId, sender); OnStartedStream?.Invoke(connectionId); } }