SpeechSynthesisConnector.DetachFlow Method
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.
Detaches the current AudioVideoFlow, freeing the connector to use another.
public:
void DetachFlow();
C#
public void DetachFlow ();
member this.DetachFlow : unit -> unit
Public Sub DetachFlow ()
The following example attaches and detaches a SpeechSynthesisConnector 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)
{
SpeechSynthesisConnector speechSynthesisConnector = new SpeechSynthesisConnector();
speechSynthesisConnector.AttachFlow(avFlow);
}
else if(avFlow.State == MediaFlowState.Terminated)
{
if (avFlow.SpeechSynthesisConnector != null)
{
avFlow.SpeechSynthesisConnector.DetachFlow();
}
}
};
Will NO-OP if no flow is attached.
Producto | Versiones |
---|---|
Lync UCMA | 4.0, 5.0, latest |