Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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));
}
};