Example #1
0
        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();
                }
            }
        }
Example #2
0
 /// <summary>
 /// Event handler that notifies us the remote party has put us on hold.
 /// </summary>
 private void OnRemotePutOnHold()
 {
     RemotePutOnHold?.Invoke(this);
 }