Share via


CallMedia.PlayAsync Method

Definition

Overloads

PlayAsync(PlayOptions, CancellationToken)

Plays audio to specified participant(s) async.

PlayAsync(PlaySource, IEnumerable<CommunicationIdentifier>, CancellationToken)

Plays audio to specified participant(s) async.

PlayAsync(IEnumerable<PlaySource>, IEnumerable<CommunicationIdentifier>, CancellationToken)

Plays audio to specified participant(s) async.

PlayAsync(PlayOptions, CancellationToken)

Source:
CallMedia.cs
Source:
CallMedia.cs

Plays audio to specified participant(s) async.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>> PlayAsync (Azure.Communication.CallAutomation.PlayOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member PlayAsync : Azure.Communication.CallAutomation.PlayOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>>
override this.PlayAsync : Azure.Communication.CallAutomation.PlayOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>>
Public Overridable Function PlayAsync (options As PlayOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PlayResult))

Parameters

options
PlayOptions

An optional object containing play options and configurations.

cancellationToken
CancellationToken

An optional CancellationToken to cancel the request.

Returns

Returns a PlayResult object, which can be used to wait for Play's related events.

Applies to

PlayAsync(PlaySource, IEnumerable<CommunicationIdentifier>, CancellationToken)

Source:
CallMedia.cs
Source:
CallMedia.cs

Plays audio to specified participant(s) async.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>> PlayAsync (Azure.Communication.CallAutomation.PlaySource playSource, System.Collections.Generic.IEnumerable<Azure.Communication.CommunicationIdentifier> playTo, System.Threading.CancellationToken cancellationToken = default);
abstract member PlayAsync : Azure.Communication.CallAutomation.PlaySource * seq<Azure.Communication.CommunicationIdentifier> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>>
override this.PlayAsync : Azure.Communication.CallAutomation.PlaySource * seq<Azure.Communication.CommunicationIdentifier> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>>
Public Overridable Function PlayAsync (playSource As PlaySource, playTo As IEnumerable(Of CommunicationIdentifier), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PlayResult))

Parameters

playSource
PlaySource
cancellationToken
CancellationToken

Returns

Returns PlayResult, which can be used to wait for Play's related events.

Applies to

PlayAsync(IEnumerable<PlaySource>, IEnumerable<CommunicationIdentifier>, CancellationToken)

Source:
CallMedia.cs

Plays audio to specified participant(s) async.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>> PlayAsync (System.Collections.Generic.IEnumerable<Azure.Communication.CallAutomation.PlaySource> playSources, System.Collections.Generic.IEnumerable<Azure.Communication.CommunicationIdentifier> playTo, System.Threading.CancellationToken cancellationToken = default);
abstract member PlayAsync : seq<Azure.Communication.CallAutomation.PlaySource> * seq<Azure.Communication.CommunicationIdentifier> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>>
override this.PlayAsync : seq<Azure.Communication.CallAutomation.PlaySource> * seq<Azure.Communication.CommunicationIdentifier> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallAutomation.PlayResult>>
Public Overridable Function PlayAsync (playSources As IEnumerable(Of PlaySource), playTo As IEnumerable(Of CommunicationIdentifier), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PlayResult))

Parameters

playSources
IEnumerable<PlaySource>
cancellationToken
CancellationToken

Returns

Returns PlayResult, which can be used to wait for Play's related events.

Applies to