MediaChannel.Direction Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current channel direction.
public:
property Microsoft::Rtc::Collaboration::AudioVideo::MediaChannelDirection Direction { Microsoft::Rtc::Collaboration::AudioVideo::MediaChannelDirection get(); };
public Microsoft.Rtc.Collaboration.AudioVideo.MediaChannelDirection Direction { get; }
member this.Direction : Microsoft.Rtc.Collaboration.AudioVideo.MediaChannelDirection
Public ReadOnly Property Direction As MediaChannelDirection
Property Value
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));
}
};