Player.SetMode Method
Sets the player's mode.
Namespace: Microsoft.Rtc.Collaboration.AudioVideo
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Sub SetMode ( _
mode As PlayerMode _
)
'Usage
Dim instance As Player
Dim mode As PlayerMode
instance.SetMode(mode)
public void SetMode(
PlayerMode mode
)
Parameters
- mode
Type: Microsoft.Rtc.Collaboration.AudioVideo.PlayerMode
The new mode.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when the mode parameter is not a value in the PlayerMode enumeration. |
Remarks
Setting the mode can affect the state of the player if it is already started.
Examples
The following example sets a manual mode to a player and then starts a player.
C# Setting manual mode to a player.
player.SetMode(PlayerMode.Manual);
player.SetSource(source);
player.AttachFlow(audioVideoFlow);
player.Start();