Partager via


CallWithChatAdapter interface

Extends

Méthodes héritées

askDevicePermission(PermissionConstraints)

Demandez des autorisations sur les appareils.

createStreamView(string, VideoStreamOptions)

Créez la vue html pour un flux.

deleteMessage(string)

Supprimez un message dans le thread.

dispose()

Supprimer le composite

disposeStreamView(string, VideoStreamOptions)

Supprimez la vue html d’un flux.

fetchInitialData()

Récupérez l’état initial de l’adaptateur Chat.

Effectue la récupération minimale nécessaire pour les méthodes ChatComposite et API.

getState()

Obtenir l’état actuel

joinCall(boolean)

Joignez l’appel avec le microphone initialement activé/désactivé.

leaveCall(boolean)

Laissez l’appel.

loadPreviousChatMessages(number)

Chargez d’autres messages précédents dans l’historique des threads de conversation.

mute()

Désactivez l’utilisateur actuel pendant l’appel ou désactivez le microphone localement.

off("callEnded", CallEndedListener)
off("callError", (e: AdapterError) => void)
off("callIdChanged", CallIdChangedListener)
off("callParticipantsJoined", ParticipantsJoinedListener)
off("callParticipantsLeft", ParticipantsLeftListener)
off("chatError", (e: AdapterError) => void)
off("chatParticipantsAdded", ParticipantsAddedListener)
off("chatParticipantsRemoved", ParticipantsRemovedListener)
off("displayNameChanged", DisplayNameChangedListener)
off("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
off("isMutedChanged", IsMutedChangedListener)
off("isSpeakingChanged", IsSpeakingChangedListener)
off("messageRead", MessageReadListener)
off("messageReceived", MessageReceivedListener)
off("messageSent", MessageReceivedListener)
off("selectedMicrophoneChanged", PropertyChangedEvent)
off("selectedSpeakerChanged", PropertyChangedEvent)
offStateChange((state: CallWithChatAdapterState) => void)

Désinscrit le gestionnaire des événements stateChanged.

on("callEnded", CallEndedListener)
on("callError", (e: AdapterError) => void)
on("callIdChanged", CallIdChangedListener)
on("callParticipantsJoined", ParticipantsJoinedListener)
on("callParticipantsLeft", ParticipantsLeftListener)
on("chatError", (e: AdapterError) => void)
on("chatParticipantsAdded", ParticipantsAddedListener)
on("chatParticipantsRemoved", ParticipantsRemovedListener)
on("displayNameChanged", DisplayNameChangedListener)
on("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
on("isMutedChanged", IsMutedChangedListener)
on("isSpeakingChanged", IsSpeakingChangedListener)
on("messageRead", MessageReadListener)
on("messageReceived", MessageReceivedListener)
on("messageSent", MessageReceivedListener)
on("selectedMicrophoneChanged", PropertyChangedEvent)
on("selectedSpeakerChanged", PropertyChangedEvent)
onStateChange((state: CallWithChatAdapterState) => void)

Abonne le gestionnaire aux événements stateChanged.

queryCameras()

Recherchez les appareils photo disponibles.

queryMicrophones()

Recherchez les appareils microphone disponibles.

querySpeakers()

Recherchez les appareils microphone disponibles.

removeParticipant(string)

Supprimez un participant d’un appel.

sendMessage(string, SendMessageOptions)

Envoyez un message dans le thread.

sendReadReceipt(string)

Envoyez un reçu de lecture pour un message.

sendTypingIndicator()

Envoyez l’indicateur de saisie dans le thread.

setCamera(VideoDeviceInfo, VideoStreamOptions)

Définissez la caméra à utiliser dans l’appel.

setMicrophone(AudioDeviceInfo)

Définissez le microphone à utiliser dans l’appel.

setSpeaker(AudioDeviceInfo)

Définissez l’orateur à utiliser dans l’appel.

startCall(string[], StartCallOptions)

Démarrez l’appel.

startCamera(VideoStreamOptions)

Démarrez la caméra.

Cette méthode démarre le rendu d’une vue de caméra locale lorsque l’appel n’est pas actif.

startScreenShare()

Commencez à partager l’écran pendant un appel.

stopCamera()

Arrêtez la caméra.

Cette méthode arrête le rendu d’une vue de caméra locale lorsque l’appel n’est pas actif.

stopScreenShare()

Arrêtez le partage de l’écran.

unmute()

Désactivez l’utilisateur actuel pendant l’appel ou activez le microphone localement.

updateMessage(string, string, Record<string, string>)

Mettez à jour un contenu de message.

Détails de la méthode héritée

askDevicePermission(PermissionConstraints)

Demandez des autorisations sur les appareils.

function askDevicePermission(constrain: PermissionConstraints): Promise<void>

Paramètres

constrain
PermissionConstraints

Définir des contraintes pour accéder aux appareils locaux <xref:%40azure%2Fcommunication-calling%23PermissionConstraints>

Retours

Promise<void>

Remarques

La fenêtre d’autorisation du navigateur s’affiche si les autorisations ne sont pas encore accordées.

héritée deCallWithChatAdapterManagement.askDevicePermission

createStreamView(string, VideoStreamOptions)

Créez la vue html pour un flux.

function createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>

Paramètres

remoteUserId

string

ID du participant à afficher, laissez-le non défini pour créer la vue de l’appareil photo local

options
VideoStreamOptions

Options pour contrôler le rendu des flux vidéo <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Retours

Promise<void | CreateVideoStreamViewResult>

Remarques

Cette méthode est implémentée pour composite.

héritée deCallWithChatAdapterManagement.createStreamView

deleteMessage(string)

Supprimez un message dans le thread.

function deleteMessage(messageId: string): Promise<void>

Paramètres

messageId

string

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.deleteMessage

dispose()

Supprimer le composite

function dispose()

héritée dejetable.dispose

disposeStreamView(string, VideoStreamOptions)

Supprimez la vue html d’un flux.

function disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>

Paramètres

remoteUserId

string

ID du participant à afficher, laissez-le non défini pour supprimer la vue de la caméra locale

options
VideoStreamOptions

Options pour contrôler le rendu des flux vidéo <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Retours

Promise<void>

Remarques

Cette méthode est implémentée pour composite.

héritée deCallWithChatAdapterManagement.disposeStreamView

fetchInitialData()

Récupérez l’état initial de l’adaptateur Chat.

Effectue la récupération minimale nécessaire pour les méthodes ChatComposite et API.

function fetchInitialData(): Promise<void>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.fetchInitialData

getState()

Obtenir l’état actuel

function getState(): CallWithChatAdapterState

Retours

héritée deAdapterState.getState

joinCall(boolean)

Joignez l’appel avec le microphone initialement activé/désactivé.

function joinCall(microphoneOn?: boolean): undefined | Call

Paramètres

microphoneOn

boolean

Indique si le microphone est initialement activé

Retours

undefined | Call

héritée deCallWithChatAdapterManagement.joinCall

leaveCall(boolean)

Laissez l’appel.

function leaveCall(forEveryone?: boolean): Promise<void>

Paramètres

forEveryone

boolean

Indique s’il faut supprimer tous les participants lors de leur départ

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.leaveCall

loadPreviousChatMessages(number)

Chargez d’autres messages précédents dans l’historique des threads de conversation.

function loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>

Paramètres

messagesToLoad

number

Retours

Promise<boolean>

Remarques

Cette méthode est généralement utilisée pour contrôler la récupération incrémentielle/le défilement infini.

héritée deCallWithChatAdapterManagement.loadPreviousChatMessages

mute()

Désactivez l’utilisateur actuel pendant l’appel ou désactivez le microphone localement.

function mute(): Promise<void>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.mute

off("callEnded", CallEndedListener)

function off(event: "callEnded", listener: CallEndedListener)

Paramètres

event

"callEnded"

héritée deCallWithChatAdapterSubscriptions.off

off("callError", (e: AdapterError) => void)

function off(event: "callError", listener: (e: AdapterError) => void)

Paramètres

event

"callError"

listener

(e: AdapterError) => void

héritée deCallWithChatAdapterSubscriptions.off

off("callIdChanged", CallIdChangedListener)

function off(event: "callIdChanged", listener: CallIdChangedListener)

Paramètres

event

"callIdChanged"

héritée deCallWithChatAdapterSubscriptions.off

off("callParticipantsJoined", ParticipantsJoinedListener)

function off(event: "callParticipantsJoined", listener: ParticipantsJoinedListener)

Paramètres

event

"callParticipantsJoined"

héritée deCallWithChatAdapterSubscriptions.off

off("callParticipantsLeft", ParticipantsLeftListener)

function off(event: "callParticipantsLeft", listener: ParticipantsLeftListener)

Paramètres

event

"callParticipantsLeft"

héritée deCallWithChatAdapterSubscriptions.off

off("chatError", (e: AdapterError) => void)

function off(event: "chatError", listener: (e: AdapterError) => void)

Paramètres

event

"chatError"

listener

(e: AdapterError) => void

héritée deCallWithChatAdapterSubscriptions.off

off("chatParticipantsAdded", ParticipantsAddedListener)

function off(event: "chatParticipantsAdded", listener: ParticipantsAddedListener)

Paramètres

event

"chatParticipantsAdded"

héritée deCallWithChatAdapterSubscriptions.off

off("chatParticipantsRemoved", ParticipantsRemovedListener)

function off(event: "chatParticipantsRemoved", listener: ParticipantsRemovedListener)

Paramètres

event

"chatParticipantsRemoved"

héritée deCallWithChatAdapterSubscriptions.off

off("displayNameChanged", DisplayNameChangedListener)

function off(event: "displayNameChanged", listener: DisplayNameChangedListener)

Paramètres

event

"displayNameChanged"

héritée deCallWithChatAdapterSubscriptions.off

off("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)

function off(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)

Paramètres

event

"isLocalScreenSharingActiveChanged"

héritée deCallWithChatAdapterSubscriptions.off

off("isMutedChanged", IsMutedChangedListener)

function off(event: "isMutedChanged", listener: IsMutedChangedListener)

Paramètres

event

"isMutedChanged"

héritée deCallWithChatAdapterSubscriptions.off

off("isSpeakingChanged", IsSpeakingChangedListener)

function off(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)

Paramètres

event

"isSpeakingChanged"

héritée deCallWithChatAdapterSubscriptions.off

off("messageRead", MessageReadListener)

function off(event: "messageRead", listener: MessageReadListener)

Paramètres

event

"messageRead"

héritée deCallWithChatAdapterSubscriptions.off

off("messageReceived", MessageReceivedListener)

function off(event: "messageReceived", listener: MessageReceivedListener)

Paramètres

event

"messageReceived"

héritée deCallWithChatAdapterSubscriptions.off

off("messageSent", MessageReceivedListener)

function off(event: "messageSent", listener: MessageReceivedListener)

Paramètres

event

"messageSent"

héritée deCallWithChatAdapterSubscriptions.off

off("selectedMicrophoneChanged", PropertyChangedEvent)

function off(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)

Paramètres

event

"selectedMicrophoneChanged"

héritée deCallWithChatAdapterSubscriptions.off

off("selectedSpeakerChanged", PropertyChangedEvent)

function off(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)

Paramètres

event

"selectedSpeakerChanged"

héritée deCallWithChatAdapterSubscriptions.off

offStateChange((state: CallWithChatAdapterState) => void)

Désinscrit le gestionnaire des événements stateChanged.

function offStateChange(handler: (state: CallWithChatAdapterState) => void)

Paramètres

handler

(state: CallWithChatAdapterState) => void

héritée deAdapterState.offStateChange

on("callEnded", CallEndedListener)

function on(event: "callEnded", listener: CallEndedListener)

Paramètres

event

"callEnded"

héritée deCallWithChatAdapterSubscriptions.on

on("callError", (e: AdapterError) => void)

function on(event: "callError", listener: (e: AdapterError) => void)

Paramètres

event

"callError"

listener

(e: AdapterError) => void

héritée deCallWithChatAdapterSubscriptions.on

on("callIdChanged", CallIdChangedListener)

function on(event: "callIdChanged", listener: CallIdChangedListener)

Paramètres

event

"callIdChanged"

héritée deCallWithChatAdapterSubscriptions.on

on("callParticipantsJoined", ParticipantsJoinedListener)

function on(event: "callParticipantsJoined", listener: ParticipantsJoinedListener)

Paramètres

event

"callParticipantsJoined"

héritée deCallWithChatAdapterSubscriptions.on

on("callParticipantsLeft", ParticipantsLeftListener)

function on(event: "callParticipantsLeft", listener: ParticipantsLeftListener)

Paramètres

event

"callParticipantsLeft"

héritée deCallWithChatAdapterSubscriptions.on

on("chatError", (e: AdapterError) => void)

function on(event: "chatError", listener: (e: AdapterError) => void)

Paramètres

event

"chatError"

listener

(e: AdapterError) => void

héritée deCallWithChatAdapterSubscriptions.on

on("chatParticipantsAdded", ParticipantsAddedListener)

function on(event: "chatParticipantsAdded", listener: ParticipantsAddedListener)

Paramètres

event

"chatParticipantsAdded"

héritée deCallWithChatAdapterSubscriptions.on

on("chatParticipantsRemoved", ParticipantsRemovedListener)

function on(event: "chatParticipantsRemoved", listener: ParticipantsRemovedListener)

Paramètres

event

"chatParticipantsRemoved"

héritée deCallWithChatAdapterSubscriptions.on

on("displayNameChanged", DisplayNameChangedListener)

function on(event: "displayNameChanged", listener: DisplayNameChangedListener)

Paramètres

event

"displayNameChanged"

héritée deCallWithChatAdapterSubscriptions.on

on("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)

function on(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)

Paramètres

event

"isLocalScreenSharingActiveChanged"

héritée deCallWithChatAdapterSubscriptions.on

on("isMutedChanged", IsMutedChangedListener)

function on(event: "isMutedChanged", listener: IsMutedChangedListener)

Paramètres

event

"isMutedChanged"

héritée deCallWithChatAdapterSubscriptions.on

on("isSpeakingChanged", IsSpeakingChangedListener)

function on(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)

Paramètres

event

"isSpeakingChanged"

héritée deCallWithChatAdapterSubscriptions.on

on("messageRead", MessageReadListener)

function on(event: "messageRead", listener: MessageReadListener)

Paramètres

event

"messageRead"

héritée deCallWithChatAdapterSubscriptions.on

on("messageReceived", MessageReceivedListener)

function on(event: "messageReceived", listener: MessageReceivedListener)

Paramètres

event

"messageReceived"

héritée deCallWithChatAdapterSubscriptions.on

on("messageSent", MessageReceivedListener)

function on(event: "messageSent", listener: MessageReceivedListener)

Paramètres

event

"messageSent"

héritée deCallWithChatAdapterSubscriptions.on

on("selectedMicrophoneChanged", PropertyChangedEvent)

function on(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)

Paramètres

event

"selectedMicrophoneChanged"

héritée deCallWithChatAdapterSubscriptions.on

on("selectedSpeakerChanged", PropertyChangedEvent)

function on(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)

Paramètres

event

"selectedSpeakerChanged"

héritée deCallWithChatAdapterSubscriptions.on

onStateChange((state: CallWithChatAdapterState) => void)

Abonne le gestionnaire aux événements stateChanged.

function onStateChange(handler: (state: CallWithChatAdapterState) => void)

Paramètres

handler

(state: CallWithChatAdapterState) => void

héritée deAdapterState.onStateChange

queryCameras()

Recherchez les appareils photo disponibles.

function queryCameras(): Promise<VideoDeviceInfo[]>

Retours

Promise<VideoDeviceInfo[]>

Tableau d’entités d’informations d’appareil vidéo <xref:%40azure%2Fcommunication-calling%23VideoDeviceInfo>

Remarques

Cette méthode doit être appelée après askDevicePermission()

héritée deCallWithChatAdapterManagement.queryCameras

queryMicrophones()

Recherchez les appareils microphone disponibles.

function queryMicrophones(): Promise<AudioDeviceInfo[]>

Retours

Promise<AudioDeviceInfo[]>

Tableau d’entités d’informations d’appareil audio <xref:%40azure%2Fcommunication-calling%23AudioDeviceInfo>

Remarques

Cette méthode doit être appelée après askDevicePermission()

héritée deCallWithChatAdapterManagement.queryMicrophones

querySpeakers()

Recherchez les appareils microphone disponibles.

function querySpeakers(): Promise<AudioDeviceInfo[]>

Retours

Promise<AudioDeviceInfo[]>

Tableau d’entités d’informations d’appareil audio <xref:%40azure%2Fcommunication-calling%23AudioDeviceInfo>

Remarques

Cette méthode doit être appelée après askDevicePermission()

héritée deCallWithChatAdapterManagement.querySpeakers

removeParticipant(string)

Supprimez un participant d’un appel.

function removeParticipant(userId: string): Promise<void>

Paramètres

userId

string

UserId du participant à supprimer.

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.removeParticipant

sendMessage(string, SendMessageOptions)

Envoyez un message dans le thread.

function sendMessage(content: string, options?: SendMessageOptions): Promise<void>

Paramètres

content

string

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.sendMessage

sendReadReceipt(string)

Envoyez un reçu de lecture pour un message.

function sendReadReceipt(chatMessageId: string): Promise<void>

Paramètres

chatMessageId

string

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.sendReadReceipt

sendTypingIndicator()

Envoyez l’indicateur de saisie dans le thread.

function sendTypingIndicator(): Promise<void>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.sendTypingIndicator

setCamera(VideoDeviceInfo, VideoStreamOptions)

Définissez la caméra à utiliser dans l’appel.

function setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>

Paramètres

sourceInfo
VideoDeviceInfo

Appareil photo à choisir, choisissez-en un retourné par queryCameras

options
VideoStreamOptions

Options permettant de contrôler le rendu du flux de caméra <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.setCamera

setMicrophone(AudioDeviceInfo)

Définissez le microphone à utiliser dans l’appel.

function setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>

Paramètres

sourceInfo
AudioDeviceInfo

Appareil microphone à choisir, sélectionnez-en un retourné par queryMicrophones

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.setMicrophone

setSpeaker(AudioDeviceInfo)

Définissez l’orateur à utiliser dans l’appel.

function setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>

Paramètres

sourceInfo
AudioDeviceInfo

Appareil haut-parleur à choisir, choisissez-en un retourné par querySpeakers

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.setSpeaker

startCall(string[], StartCallOptions)

Démarrez l’appel.

function startCall(participants: string[], options?: StartCallOptions): undefined | Call

Paramètres

participants

string[]

Tableau d’ID de participant à joindre

Retours

undefined | Call

héritée deCallWithChatAdapterManagement.startCall

startCamera(VideoStreamOptions)

Démarrez la caméra.

Cette méthode démarre le rendu d’une vue de caméra locale lorsque l’appel n’est pas actif.

function startCamera(options?: VideoStreamOptions): Promise<void>

Paramètres

options
VideoStreamOptions

Options pour contrôler le rendu des flux vidéo <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.startCamera

startScreenShare()

Commencez à partager l’écran pendant un appel.

function startScreenShare(): Promise<void>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.startScreenShare

stopCamera()

Arrêtez la caméra.

Cette méthode arrête le rendu d’une vue de caméra locale lorsque l’appel n’est pas actif.

function stopCamera(): Promise<void>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.stopCamera

stopScreenShare()

Arrêtez le partage de l’écran.

function stopScreenShare(): Promise<void>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.stopScreenShare

unmute()

Désactivez l’utilisateur actuel pendant l’appel ou activez le microphone localement.

function unmute(): Promise<void>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.unmute

updateMessage(string, string, Record<string, string>)

Mettez à jour un contenu de message.

function updateMessage(messageId: string, content: string, metadata?: Record<string, string>): Promise<void>

Paramètres

messageId

string

content

string

metadata

Record<string, string>

Retours

Promise<void>

héritée deCallWithChatAdapterManagement.updateMessage