Recorder.DetachFlow Method
Detaches an AudioVideoFlow instance from this recorder.
Namespace: Microsoft.Rtc.Collaboration.AudioVideo
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Sub DetachFlow
'Usage
Dim instance As Recorder
instance.DetachFlow()
public void DetachFlow()
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();
}
}
};