Share via


Player.Pause Method

Pauses playing the media source.

Namespace:  Microsoft.Rtc.Collaboration.AudioVideo
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Sub Pause
'Usage
Dim instance As Player

instance.Pause()
public void Pause()

Exceptions

Exception Condition
InvalidOperationException

Thrown when the player's State is not Started.

Remarks

Pause maintains the current playing position. Pause can be called only on player whose state is Started. To resume recording call Player.Start.

Examples

The following example starts, pause, restarts (by calling Start) and stops the player.

C# Starting, pausing, restarting and stopping a Player.

 

            player.SetSource(source);
            player.AttachFlow(audioVideoFlow);
            player.Start();



            player.Pause();



            player.Start();



            player.Stop();


See Also

Reference

Player Class

Player Members

Microsoft.Rtc.Collaboration.AudioVideo Namespace