Player.DetachFlow(AudioVideoFlow) Method
Definition
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 an AudioVideoFlow instance from this player.
public:
void DetachFlow(Microsoft::Rtc::Collaboration::AudioVideo::AudioVideoFlow ^ audioVideoFlow);
public void DetachFlow (Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoFlow audioVideoFlow);
member this.DetachFlow : Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoFlow -> unit
Parameters
- audioVideoFlow
- AudioVideoFlow
The AudioVideoFlow instance to be detached.
Exceptions
Thrown when the audioVideoFlow parameter is null.
Examples
The following example attaches and detaches a Player 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)
{
Player player = new Player();
player.AttachFlow(avFlow);
}
else if(avFlow.State == MediaFlowState.Terminated)
{
if (avFlow.Player != null)
{
// As Player accepts multiple AudioVideoFlows, DetachFlow requires an AudioVideoFlow as argument.
avFlow.Player.DetachFlow(avFlow);
}
}
};
Remarks
If the specified AudioVideoFlow instance is not attached to this player, DetachFlow merely returns.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for