AudioVideoFlow.Initialize Method
Copies the properties from the template to the AudioVideoFlow instance.
Namespace: Microsoft.Rtc.Collaboration.AudioVideo
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Sub Initialize ( _
template As AudioVideoFlowTemplate _
)
'Usage
Dim instance As AudioVideoFlow
Dim template As AudioVideoFlowTemplate
instance.Initialize(template)
public void Initialize(
AudioVideoFlowTemplate template
)
Parameters
- template
Type: Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoFlowTemplate
The template to use.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Thrown when the method is not called within the context of the AudioVideoCall FlowCreated event, or when the AudioVideoFlow is not in the Idle state. |
ArgumentNullException | Thrown when the template argument is null. |
Examples
The following example initializes and AudioVideoFlow turning tone support off.
C# Initializing an AudioVideoFlow.
audioVideoCall.AudioVideoFlowConfigurationRequested += delegate(object sender, AudioVideoFlowConfigurationRequestedEventArgs args)
{
AudioVideoFlow avFlow = (AudioVideoFlow)sender;
AudioVideoFlowTemplate template = new AudioVideoFlowTemplate(avFlow);
template.TonePolicy = TonePolicy.NotSupported;
avFlow.Initialize(template);
};