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.
Attaches an AudioVideoFlow instance to this recorder.
Namespace: Microsoft.Rtc.Collaboration.AudioVideo
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Sub AttachFlow ( _
audioVideoFlow As AudioVideoFlow _
)
'Usage
Dim instance As Recorder
Dim audioVideoFlow As AudioVideoFlow
instance.AttachFlow(audioVideoFlow)
public void AttachFlow(
AudioVideoFlow audioVideoFlow
)
Parameters
- audioVideoFlow
Type: Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoFlow
The AudioVideoFlow instance to be attached.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown when the audioVideoFlow parameter is null. |
| InvalidOperationException | Thrown when the recorder is already attached to another AudioVideoFlow instance. |
Examples
The following example attaches and detaches a Recorder by the time AudioVideoFlow changes its state to Active and Terminated.
C# Attaching and detaching an AudioVideoFlow.
audioVideoFlow.StateChanged += delegate(object sender, MediaFlowStateChangedEventArgs args)
{
AudioVideoFlow avFlow = (AudioVideoFlow)sender;
if(avFlow.State == MediaFlowState.Active)
{
Recorder recorder = new Recorder();
recorder.AttachFlow(avFlow);
}
else if(avFlow.State == MediaFlowState.Terminated)
{
if (avFlow.Recorder != null)
{
avFlow.Recorder.DetachFlow();
}
}
};