MediaChannel.Direction Property

Gets the current channel direction.

Namespace:  Microsoft.Rtc.Collaboration.AudioVideo
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Property Direction As MediaChannelDirection
    Get
    Friend Set
'Usage
Dim instance As MediaChannel
Dim value As MediaChannelDirection

value = instance.Direction
public MediaChannelDirection Direction { get; internal set; }

Property Value

Type: Microsoft.Rtc.Collaboration.AudioVideo.MediaChannelDirection

Examples

The following example disconnects the call if media channel direction changes to some value different than SendReceive or Inactive.

C# Verifying MediaChannel's properties.

 

            audioVideoFlow.ConfigurationChanged += delegate(object sender, AudioVideoFlowConfigurationChangedEventArgs arg)
            {
                AudioVideoFlow avFlow = (AudioVideoFlow)sender;

                // check directions
                AudioChannel audioChannel = (AudioChannel)avFlow.Audio.GetChannels()[ChannelLabel.AudioMono];
                if ((audioChannel.Direction != MediaChannelDirection.SendReceive)
                    && (audioChannel.Direction != MediaChannelDirection.Inactive))
                {
                    AudioVideoCall call = avFlow.Call;
                    call.EndTerminate(call.BeginTerminate(null, null));
                }
            };


See Also

Reference

MediaChannel Class

MediaChannel Members

Microsoft.Rtc.Collaboration.AudioVideo Namespace