[RN] Allow to override callHandle for CallKit (coding style)
This commit is contained in:
parent
81be082fe7
commit
a82ed4653e
|
@ -44,12 +44,11 @@ const WHITELISTED_KEYS = [
|
||||||
'callDisplayName',
|
'callDisplayName',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The call handle of the CallKit call representing the conference/meeting
|
* The handle
|
||||||
* associated with this config.js. The property is meant for use cases in
|
* ({@link https://developer.apple.com/documentation/callkit/cxhandle}) of
|
||||||
* which Jitsi Meet is to work with a CallKit call created outside of Jitsi
|
* the CallKit call representing the conference/meeting associated with this
|
||||||
* Meet and to be adopted by Jitsi Meet such as, for example, an incoming
|
* config.js. The property is meant for use cases in which the room URL is
|
||||||
* and/or outgoing CallKit call created by Jitsi Meet SDK for iOS
|
* not desirable as the handle for CallKit purposes. As the value is
|
||||||
* clients/consumers prior to giving control to Jitsi Meet. As the value is
|
|
||||||
* associated with a conference/meeting, the value makes sense not as a
|
* associated with a conference/meeting, the value makes sense not as a
|
||||||
* deployment-wide configuration, only as a runtime configuration
|
* deployment-wide configuration, only as a runtime configuration
|
||||||
* override/overwrite provided by, for example, Jitsi Meet SDK for iOS.
|
* override/overwrite provided by, for example, Jitsi Meet SDK for iOS.
|
||||||
|
|
|
@ -227,17 +227,16 @@ function _conferenceWillJoin({ getState }, next, action) {
|
||||||
|
|
||||||
const { conference } = action;
|
const { conference } = action;
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const { callUUID, callHandle } = state['features/base/config'];
|
const { callHandle, callUUID } = state['features/base/config'];
|
||||||
const url = getInviteURL(state);
|
const url = getInviteURL(state);
|
||||||
|
const handle = callHandle || url.toString();
|
||||||
const hasVideo = !isVideoMutedByAudioOnly(state);
|
const hasVideo = !isVideoMutedByAudioOnly(state);
|
||||||
|
|
||||||
// When assigning the call UUID, do so in upper case, since iOS will return
|
// When assigning the call UUID, do so in upper case, since iOS will return
|
||||||
// it upper cased.
|
// it upper cased.
|
||||||
conference.callUUID = (callUUID || uuid.v4()).toUpperCase();
|
conference.callUUID = (callUUID || uuid.v4()).toUpperCase();
|
||||||
|
|
||||||
const handleURL = callHandle || url.toString();
|
CallKit.startCall(conference.callUUID, handle, hasVideo)
|
||||||
|
|
||||||
CallKit.startCall(conference.callUUID, handleURL, hasVideo)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
const { callee } = state['features/base/jwt'];
|
const { callee } = state['features/base/jwt'];
|
||||||
const displayName
|
const displayName
|
||||||
|
|
Loading…
Reference in New Issue