AudioVideoFlow.ConfigurationChanged Event

Definition

Raised by an AudioVideoFlow instance when any configuration has changed.

public:
 event EventHandler<Microsoft::Rtc::Collaboration::AudioVideo::AudioVideoFlowConfigurationChangedEventArgs ^> ^ ConfigurationChanged;
public event EventHandler<Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoFlowConfigurationChangedEventArgs> ConfigurationChanged;
member this.ConfigurationChanged : EventHandler<Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoFlowConfigurationChangedEventArgs> 
Public Custom Event ConfigurationChanged As EventHandler(Of AudioVideoFlowConfigurationChangedEventArgs) 

Event Type

EventHandler<AudioVideoFlowConfigurationChangedEventArgs>

Examples

The following example subscribes to AudioVideoFlowConfigurationRequested, and when event is received it disconnects the call if audio channel direction is different than SendReceive or Inactive.

C# Subscribing to AudioVideoFlowConfigurationRequested.


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)
        &amp;&amp; (audioChannel.Direction != MediaChannelDirection.Inactive))
    {
        AudioVideoCall call = avFlow.Call;
        call.EndTerminate(call.BeginTerminate(null, null));
    }
};



Remarks

Configuration changes occur when there is a change in the media flow that causes renegotiation to occur. Such a change can be the result of actions by the AudioVideoFlow instance, actions by the remote user, or by changes in the state of the media flow.

AudioVideoFlow-related changes that can cause renegotiation:

  • Calls to BeginHold and EndHold (which affect HoldStatus)
  • Calls to BeginRetrieve and EndRetrieve (which affect HoldStatus)
  • Calls to BeginApplyChanges and EndApplyChanges (which affect the TonePolicy and ToneEnabled properties on the AudioVideoFlow instance; the AllowedDirection, Direction, SamplingRate, and HighPerformance properties on the associated media channel )

Changes from the remote endpoint that can cause renegotiation:

  • Changes to Direction property on the media channel
  • Changes to the ToneEnabled property on the AudioVideoFlow instance

Internal configuration changes that can cause renegotiation:

  • A change in the State property on the media flow (Idle to Active, Idle to Terminated, or Active to Terminated)
  • The remote endpoint terminated the call.
  • A user terminated the call.

Configuration changes that do not involve renegotiation, and so do not cause ConfigurationChanged to be raised:

  • Attaching or detaching a device
  • Muting or unmuting the audio

Applies to