CallConnection class
CallConnection 類別代表呼叫連線型 API。
方法
| add |
將參與者新增至通話 |
| cancel |
取消添加參與者請求。 |
| get |
取得呼叫的通話連線屬性 |
| get |
初始化 CallMedia 的新實例。 |
| get |
從通話取得參與者 |
| hang |
請自行掛斷通話,或終止整個呼叫。 |
| list |
從通話取得所有參與者 |
| mute |
將參與者從通話中靜音。 |
| remove |
從通話中移除參與者 |
| transfer |
將通話轉移給目標參與者 |
建構函式詳細資料
CallConnection(string, string, TokenCredential | KeyCredential, CallAutomationApiClientOptionalParams)
new CallConnection(callConnectionId: string, endpoint: string, credential: TokenCredential | KeyCredential, options?: CallAutomationApiClientOptionalParams)
參數
- callConnectionId
-
string
- endpoint
-
string
- credential
- options
-
CallAutomationApiClientOptionalParams
方法詳細資料
addParticipant(CallInvite, AddParticipantOptions)
將參與者新增至通話
function addParticipant(targetParticipant: CallInvite, options?: AddParticipantOptions): Promise<AddParticipantResult>
參數
- targetParticipant
- CallInvite
- options
- AddParticipantOptions
傳回
Promise<AddParticipantResult>
cancelAddParticipantOperation(string, CancelAddParticipantOperationOptions)
取消添加參與者請求。
function cancelAddParticipantOperation(invitationId: string, options?: CancelAddParticipantOperationOptions): Promise<CancelAddParticipantOperationResult>
參數
- invitationId
-
string
用來取消新增參與者要求的邀請標識碼。
傳回
Promise<CancelAddParticipantOperationResult>
getCallConnectionProperties(OperationOptions)
取得呼叫的通話連線屬性
function getCallConnectionProperties(options?: OperationOptions): Promise<CallConnectionProperties>
參數
- options
- OperationOptions
傳回
Promise<CallConnectionProperties>
getCallMedia()
getParticipant(CommunicationIdentifier, OperationOptions)
從通話取得參與者
function getParticipant(targetParticipant: CommunicationIdentifier, options?: OperationOptions): Promise<CallParticipant>
參數
- targetParticipant
- CommunicationIdentifier
要求參與者的通訊標識碼。
- options
- OperationOptions
傳回
Promise<CallParticipant>
hangUp(boolean, OperationOptions)
請自行掛斷通話,或終止整個呼叫。
function hangUp(isForEveryone: boolean, options?: OperationOptions): Promise<void>
參數
- isForEveryone
-
boolean
- options
- OperationOptions
傳回
Promise<void>
listParticipants(OperationOptions)
從通話取得所有參與者
function listParticipants(options?: OperationOptions): Promise<ListParticipantsResult>
參數
- options
- OperationOptions
傳回
Promise<ListParticipantsResult>
muteParticipant(CommunicationIdentifier, MuteParticipantOption)
將參與者從通話中靜音。
function muteParticipant(participant: CommunicationIdentifier, options?: MuteParticipantOption): Promise<MuteParticipantResult>
參數
- participant
- CommunicationIdentifier
要從通話中靜音的參與者。
- options
- MuteParticipantOption
靜音參與者的其他屬性。
傳回
Promise<MuteParticipantResult>
removeParticipant(CommunicationIdentifier, RemoveParticipantsOption)
從通話中移除參與者
function removeParticipant(participant: CommunicationIdentifier, options?: RemoveParticipantsOption): Promise<RemoveParticipantResult>
參數
- participant
- CommunicationIdentifier
參與者將會從通話中移除。
- options
- RemoveParticipantsOption
傳回
Promise<RemoveParticipantResult>
transferCallToParticipant(CommunicationIdentifier, TransferCallToParticipantOptions)
將通話轉移給目標參與者
function transferCallToParticipant(targetParticipant: CommunicationIdentifier, options?: TransferCallToParticipantOptions): Promise<TransferCallResult>
參數
- targetParticipant
- CommunicationIdentifier
要傳送的目標。
- options
- TransferCallToParticipantOptions
傳回
Promise<TransferCallResult>