CallWithChatAdapter interface
CallWithChatComposite Interface de l’adaptateur.
- Extends
Méthodes héritées
Détails de la méthode héritée
askDevicePermission(PermissionConstraints)
Demandez les autorisations des 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.
createStreamView(string, VideoStreamOptions)
Créez l’affichage 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 la caméra locale
- options
- VideoStreamOptions
Options permettant de 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 les composites.
deleteMessage(string)
Supprimez un message dans le thread.
function deleteMessage(messageId: string): Promise<void>
Paramètres
- messageId
-
string
Retours
Promise<void>
dispose()
disposeStreamView(string, VideoStreamOptions)
Supprimer l’affichage 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 permettant de 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 les composites.
fetchInitialData()
Récupérez l’état initial de l’adaptateur De conversation.
Effectue l’extraction minimale nécessaire pour les méthodes ChatComposite et API.
function fetchInitialData(): Promise<void>
Retours
Promise<void>
getState()
Obtenir l’état actuel
function getState(): CallWithChatAdapterState
Retours
Hérité deAdapterState.getState
joinCall(boolean)
Joignez l’appel avec le microphone initialement activé/désactivé.
function joinCall(microphoneOn?: boolean): undefined | Call
Paramètres
- microphoneOn
-
boolean
Si le microphone est activé initialement
Retours
undefined | Call
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>
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 l’extraction incrémentielle/le défilement infini.
Hérité 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é deCallWithChatAdapterManagement.mute
off("callEnded", CallEndedListener)
function off(event: "callEnded", listener: CallEndedListener)
Paramètres
- event
-
"callEnded"
- listener
- CallEndedListener
Hérité 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é deCallWithChatAdapterSubscriptions.off
off("callIdChanged", CallIdChangedListener)
function off(event: "callIdChanged", listener: CallIdChangedListener)
Paramètres
- event
-
"callIdChanged"
- listener
- CallIdChangedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("callParticipantsJoined", ParticipantsJoinedListener)
function off(event: "callParticipantsJoined", listener: ParticipantsJoinedListener)
Paramètres
- event
-
"callParticipantsJoined"
- listener
- ParticipantsJoinedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("callParticipantsLeft", ParticipantsLeftListener)
function off(event: "callParticipantsLeft", listener: ParticipantsLeftListener)
Paramètres
- event
-
"callParticipantsLeft"
- listener
- ParticipantsLeftListener
Hérité 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é deCallWithChatAdapterSubscriptions.off
off("chatParticipantsAdded", ParticipantsAddedListener)
function off(event: "chatParticipantsAdded", listener: ParticipantsAddedListener)
Paramètres
- event
-
"chatParticipantsAdded"
- listener
- ParticipantsAddedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("chatParticipantsRemoved", ParticipantsRemovedListener)
function off(event: "chatParticipantsRemoved", listener: ParticipantsRemovedListener)
Paramètres
- event
-
"chatParticipantsRemoved"
- listener
- ParticipantsRemovedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("displayNameChanged", DisplayNameChangedListener)
function off(event: "displayNameChanged", listener: DisplayNameChangedListener)
Paramètres
- event
-
"displayNameChanged"
- listener
- DisplayNameChangedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
function off(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)
Paramètres
- event
-
"isLocalScreenSharingActiveChanged"
Hérité deCallWithChatAdapterSubscriptions.off
off("isMutedChanged", IsMutedChangedListener)
function off(event: "isMutedChanged", listener: IsMutedChangedListener)
Paramètres
- event
-
"isMutedChanged"
- listener
- IsMutedChangedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("isSpeakingChanged", IsSpeakingChangedListener)
function off(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)
Paramètres
- event
-
"isSpeakingChanged"
- listener
- IsSpeakingChangedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("messageRead", MessageReadListener)
function off(event: "messageRead", listener: MessageReadListener)
Paramètres
- event
-
"messageRead"
- listener
- MessageReadListener
Hérité deCallWithChatAdapterSubscriptions.off
off("messageReceived", MessageReceivedListener)
function off(event: "messageReceived", listener: MessageReceivedListener)
Paramètres
- event
-
"messageReceived"
- listener
- MessageReceivedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("messageSent", MessageReceivedListener)
function off(event: "messageSent", listener: MessageReceivedListener)
Paramètres
- event
-
"messageSent"
- listener
- MessageReceivedListener
Hérité deCallWithChatAdapterSubscriptions.off
off("selectedMicrophoneChanged", PropertyChangedEvent)
function off(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)
Paramètres
- event
-
"selectedMicrophoneChanged"
- listener
- PropertyChangedEvent
Hérité deCallWithChatAdapterSubscriptions.off
off("selectedSpeakerChanged", PropertyChangedEvent)
function off(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)
Paramètres
- event
-
"selectedSpeakerChanged"
- listener
- PropertyChangedEvent
Hérité deCallWithChatAdapterSubscriptions.off
offStateChange((state: CallWithChatAdapterState) => void)
Annule le gestionnaire pour les événements stateChanged.
function offStateChange(handler: (state: CallWithChatAdapterState) => void)
Paramètres
- handler
-
(state: CallWithChatAdapterState) => void
Hérité deAdapterState.offStateChange
on("callEnded", CallEndedListener)
function on(event: "callEnded", listener: CallEndedListener)
Paramètres
- event
-
"callEnded"
- listener
- CallEndedListener
Hérité 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é deCallWithChatAdapterSubscriptions.on
on("callIdChanged", CallIdChangedListener)
function on(event: "callIdChanged", listener: CallIdChangedListener)
Paramètres
- event
-
"callIdChanged"
- listener
- CallIdChangedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("callParticipantsJoined", ParticipantsJoinedListener)
function on(event: "callParticipantsJoined", listener: ParticipantsJoinedListener)
Paramètres
- event
-
"callParticipantsJoined"
- listener
- ParticipantsJoinedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("callParticipantsLeft", ParticipantsLeftListener)
function on(event: "callParticipantsLeft", listener: ParticipantsLeftListener)
Paramètres
- event
-
"callParticipantsLeft"
- listener
- ParticipantsLeftListener
Hérité 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é deCallWithChatAdapterSubscriptions.on
on("chatParticipantsAdded", ParticipantsAddedListener)
function on(event: "chatParticipantsAdded", listener: ParticipantsAddedListener)
Paramètres
- event
-
"chatParticipantsAdded"
- listener
- ParticipantsAddedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("chatParticipantsRemoved", ParticipantsRemovedListener)
function on(event: "chatParticipantsRemoved", listener: ParticipantsRemovedListener)
Paramètres
- event
-
"chatParticipantsRemoved"
- listener
- ParticipantsRemovedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("displayNameChanged", DisplayNameChangedListener)
function on(event: "displayNameChanged", listener: DisplayNameChangedListener)
Paramètres
- event
-
"displayNameChanged"
- listener
- DisplayNameChangedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
function on(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)
Paramètres
- event
-
"isLocalScreenSharingActiveChanged"
Hérité deCallWithChatAdapterSubscriptions.on
on("isMutedChanged", IsMutedChangedListener)
function on(event: "isMutedChanged", listener: IsMutedChangedListener)
Paramètres
- event
-
"isMutedChanged"
- listener
- IsMutedChangedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("isSpeakingChanged", IsSpeakingChangedListener)
function on(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)
Paramètres
- event
-
"isSpeakingChanged"
- listener
- IsSpeakingChangedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("messageRead", MessageReadListener)
function on(event: "messageRead", listener: MessageReadListener)
Paramètres
- event
-
"messageRead"
- listener
- MessageReadListener
Hérité deCallWithChatAdapterSubscriptions.on
on("messageReceived", MessageReceivedListener)
function on(event: "messageReceived", listener: MessageReceivedListener)
Paramètres
- event
-
"messageReceived"
- listener
- MessageReceivedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("messageSent", MessageReceivedListener)
function on(event: "messageSent", listener: MessageReceivedListener)
Paramètres
- event
-
"messageSent"
- listener
- MessageReceivedListener
Hérité deCallWithChatAdapterSubscriptions.on
on("selectedMicrophoneChanged", PropertyChangedEvent)
function on(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)
Paramètres
- event
-
"selectedMicrophoneChanged"
- listener
- PropertyChangedEvent
Hérité deCallWithChatAdapterSubscriptions.on
on("selectedSpeakerChanged", PropertyChangedEvent)
function on(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)
Paramètres
- event
-
"selectedSpeakerChanged"
- listener
- PropertyChangedEvent
Hérité 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é deAdapterState.onStateChange
queryCameras()
Recherchez les appareils photo disponibles.
function queryCameras(): Promise<VideoDeviceInfo[]>
Retours
Promise<VideoDeviceInfo[]>
Tableau d’entités d’informations sur les appareils vidéo <xref:%40azure%2Fcommunication-calling%23VideoDeviceInfo>
Remarques
Cette méthode doit être appelée après askDevicePermission()
queryMicrophones()
Recherchez les périphériques microphone disponibles.
function queryMicrophones(): Promise<AudioDeviceInfo[]>
Retours
Promise<AudioDeviceInfo[]>
Tableau d’entités d’informations sur les appareils audio <xref:%40azure%2Fcommunication-calling%23AudioDeviceInfo>
Remarques
Cette méthode doit être appelée après askDevicePermission()
querySpeakers()
Recherchez les périphériques microphone disponibles.
function querySpeakers(): Promise<AudioDeviceInfo[]>
Retours
Promise<AudioDeviceInfo[]>
Tableau d’entités d’informations sur les appareils audio <xref:%40azure%2Fcommunication-calling%23AudioDeviceInfo>
Remarques
Cette méthode doit être appelée après askDevicePermission()
removeParticipant(string)
Supprimer un participant d’un appel.
function removeParticipant(userId: string): Promise<void>
Paramètres
- userId
-
string
UserId du participant à supprimer.
Retours
Promise<void>
sendMessage(string, SendMessageOptions)
Envoyez un message dans le thread.
function sendMessage(content: string, options?: SendMessageOptions): Promise<void>
Paramètres
- content
-
string
- options
- SendMessageOptions
Retours
Promise<void>
sendReadReceipt(string)
Envoyer un accusé de lecture pour un message.
function sendReadReceipt(chatMessageId: string): Promise<void>
Paramètres
- chatMessageId
-
string
Retours
Promise<void>
sendTypingIndicator()
Envoyer l’indicateur de saisie dans le thread.
function sendTypingIndicator(): Promise<void>
Retours
Promise<void>
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 d’appareil photo <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>
Retours
Promise<void>
setMicrophone(AudioDeviceInfo)
Définissez le microphone à utiliser dans l’appel.
function setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>
Paramètres
- sourceInfo
- AudioDeviceInfo
Périphérique de microphone à choisir, choisissez-en un retourné par requêteMicrophones
Retours
Promise<void>
setSpeaker(AudioDeviceInfo)
Définissez le haut-parleur à 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>
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
- options
- StartCallOptions
Retours
undefined | Call
startCamera(VideoStreamOptions)
Démarrez la caméra.
Cette méthode commence à afficher une vue de caméra locale lorsque l’appel n’est pas actif.
function startCamera(options?: VideoStreamOptions): Promise<void>
Paramètres
- options
- VideoStreamOptions
Options permettant de contrôler le rendu des flux vidéo <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>
Retours
Promise<void>
startScreenShare()
Commencez à partager l’écran pendant un appel.
function startScreenShare(): Promise<void>
Retours
Promise<void>
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>
stopScreenShare()
Arrêtez le partage de l’écran.
function stopScreenShare(): Promise<void>
Retours
Promise<void>
unmute()
Réactivez l’utilisateur actuel pendant l’appel ou activez le microphone localement.
function unmute(): Promise<void>
Retours
Promise<void>
Hérité deCallWithChatAdapterManagement.unmute
updateMessage(string, string, Record<string, string>)
Mettre à jour le contenu d’un 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>