private void CheckRemotePartyHoldCondition(SDP remoteSDP) { var mediaStreamStatus = remoteSDP.GetMediaStreamStatus(SDPMediaTypesEnum.audio, 0); if (mediaStreamStatus == MediaStreamStatusEnum.SendOnly) { if (!RemoteOnHold) { RemoteOnHold = true; RemotePutOnHold?.Invoke(); } } else if (mediaStreamStatus == MediaStreamStatusEnum.SendRecv && RemoteOnHold) { if (RemoteOnHold) { RemoteOnHold = false; RemoteTookOffHold?.Invoke(); } } }
/// <summary> /// Event handler that notifies us the remote party has put us on hold. /// </summary> private void OnRemotePutOnHold() { RemotePutOnHold?.Invoke(this); }