Dela via


CallConnection.PlayAudioAsync Method

Definition

Overloads

PlayAudioAsync(PlayAudioOptions, CancellationToken)

Play audio in the call.

PlayAudioAsync(Uri, Nullable<Boolean>, String, Uri, String, CancellationToken)

Play audio in the call.

PlayAudioAsync(PlayAudioOptions, CancellationToken)

Source:
CallConnection.cs

Play audio in the call.

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

Parameters

options
PlayAudioOptions

Play audio request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

The server returned an error. See Message for details returned from the server.

options is null.

Applies to

PlayAudioAsync(Uri, Nullable<Boolean>, String, Uri, String, CancellationToken)

Source:
CallConnection.cs

Play audio in the call.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallingServer.PlayAudioResult>> PlayAudioAsync (Uri audioFileUri, bool? loop, string audioFileId, Uri callbackUri, string operationContext = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PlayAudioAsync : Uri * Nullable<bool> * string * Uri * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallingServer.PlayAudioResult>>
override this.PlayAudioAsync : Uri * Nullable<bool> * string * Uri * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallingServer.PlayAudioResult>>
Public Overridable Function PlayAudioAsync (audioFileUri As Uri, loop As Nullable(Of Boolean), audioFileId As String, callbackUri As Uri, Optional operationContext As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PlayAudioResult))

Parameters

audioFileUri
Uri

The uri of the audio file.

loop
Nullable<Boolean>

The flag to indicate if audio file need to be played in a loop or not.

audioFileId
String

Tne id for the media in the AudioFileUri, using which we cache the media resource.

callbackUri
Uri

The callback Uri to receive PlayAudio status notifications.

operationContext
String

The operation context.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

The server returned an error. See Message for details returned from the server.

Applies to