Udostępnij za pośrednictwem


ServerCall.PlayAudioAsync(Uri, String, Uri, String, CancellationToken) Method

Definition

Play audio in the call.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallingServer.PlayAudioResult>> PlayAudioAsync (Uri audioFileUri, string audioFileId, Uri callbackUri, string operationContext = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PlayAudioAsync : Uri * string * Uri * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallingServer.PlayAudioResult>>
override this.PlayAudioAsync : Uri * string * Uri * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.CallingServer.PlayAudioResult>>
Public Overridable Function PlayAudioAsync (audioFileUri As Uri, 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.

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