你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CallMedia.Play 方法

定义

重载

Play(PlayOptions, CancellationToken)

向指定的参与者 () 播放音频。

Play(PlaySource, IEnumerable<CommunicationIdentifier>, CancellationToken)

播放文件。

Play(PlayOptions, CancellationToken)

Source:
CallMedia.cs
Source:
CallMedia.cs

向指定的参与者 () 播放音频。

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

参数

options
PlayOptions

包含播放选项和配置的可选对象。

cancellationToken
CancellationToken

用于取消请求的可选 CancellationToken。

返回

返回 PlayResult,可用于等待 Play 的相关事件。

适用于

Play(PlaySource, IEnumerable<CommunicationIdentifier>, CancellationToken)

Source:
CallMedia.cs
Source:
CallMedia.cs

播放文件。

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

参数

playSource
PlaySource
cancellationToken
CancellationToken

返回

返回 PlayResult,可用于等待 Play 的相关事件。

适用于