How to access the Call object when using Adapters #4939
JamesBurnside
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
You may need to access to the
@azure/communication-call
Call object for features not yet implemented by the@azure/communication-react
CallAdapters.This can be done by altering the method used to create Adapters.
Normally to create an adapter you would use one of the following:
However, the adapter itself does not expose a reference to the underlying Call Object.
Instead you can use the
create*FromClients()
functions:These require first creating the Clients that power the adapter. Here is an example on creating a CallWithChatAdapter:
The adapter can then be passed into a Composite as before:
However, by creating the adapter after creating the underlying client, you now have raw access to
callClient
,callAgent
,chatClient
, andchatThreadClient
.The
callAgent.calls
provides access to the ongoing calls:Afterwards, this
call
object can be used to access features not yet exposed by the adapter, e.g.:Beta Was this translation helpful? Give feedback.
All reactions