Skip to content

Commit

Permalink
feat: enable 3-way-calling with CallControl permission (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
embbnux authored Mar 10, 2021
1 parent 9fc4933 commit e8e568e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 22 deletions.
17 changes: 3 additions & 14 deletions docs/disable-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,14 @@ To enable it by passing `disableConferenceInvite=false` on adapter.js uri or ifr

## Enable Conference Call feature

Conference Call (3-way-calling) feature is in beta. It is disabled it by default. To enable it:
To enable Conference Call (3-way-calling) feature, please add `CallControl` permission to your app in RingCentral Developer website. Please send email to [devsupport](mailto:[email protected]) to add it if your app has been graduated into production. After permissions added, you can get the feature after re-login to the widget.

```js
<script>
(function() {
var rcs = document.createElement("script");
rcs.src = "https://ringcentral.github.io/ringcentral-embeddable/adapter.js?disableConferenceCall=false";
var rcs0 = document.getElementsByTagName("script")[0];
rcs0.parentNode.insertBefore(rcs, rcs0);
})();
</script>
```

Before we start to use Conference Call feature, need to add `TelephonySessions` permission to your app in RingCentral Developer website. This feature is in beta. Please send email to [devsupport](mailto:[email protected]) to add `TelephonySessions` permission if you get any problem.
![conference call](https://user-images.githubusercontent.com/7036536/110581133-eb770e80-81a4-11eb-9951-fde986a07780.png)

## Enable Active Call Control feature

Active Call Control feature uses new `CallControl` RESTful API to control RingCentral Call. With this API, users can control their calls on other devices in this widget.

Before we start to use Active Call Control feature, need to add `CallControl` permission to your app in RingCentral Developer website. After permissions added, you can get the feature after relogin to the widget.
Before we start to use Active Call Control feature, need to add `CallControl` permission to your app in RingCentral Developer website. After permissions added, you can get the feature after re-login to the widget.

Please send email to [devsupport](mailto:[email protected]) to add `CallControl` permission if you get any problem.
2 changes: 0 additions & 2 deletions src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const {
disableReadText,
disableConferenceInvite,
disableGlip,
disableConferenceCall,
disableMeeting,
authProxy,
prefix,
Expand Down Expand Up @@ -104,7 +103,6 @@ const appUri = `${appUrl}?${obj2uri({
disableReadText,
disableConferenceInvite,
disableGlip,
disableConferenceCall,
disableMeeting,
authProxy,
prefix,
Expand Down
2 changes: 0 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ const disableMessages = typeof pathParams.disableMessages !== 'undefined';
const disableReadText = typeof pathParams.disableReadText !== 'undefined';
const disableConferenceInvite = typeof pathParams.disableConferenceInvite === 'undefined' || pathParams.disableConferenceInvite === 'true';
const disableGlip = typeof pathParams.disableGlip === 'undefined' || pathParams.disableGlip === 'true';
const disableConferenceCall = typeof pathParams.disableConferenceCall === 'undefined' || pathParams.disableConferenceCall === 'true';
const disableMeeting = typeof pathParams.disableMeeting !== 'undefined';

const prefix = pathParams.prefix || defaultPrefix;
Expand Down Expand Up @@ -115,7 +114,6 @@ const phone = createPhone({
disableReadText,
disableConferenceInvite,
disableGlip,
disableConferenceCall,
disableMeeting,
authProxy,
userAgent,
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h2>C2D demo</h2>
<script>
(function () {
var rcs = document.createElement('script');
rcs.src = './adapter.js?notification=1&disableGlip=false&disableConferenceCall=false&multipleTabsSupport=1';
rcs.src = './adapter.js?notification=1&disableGlip=false&multipleTabsSupport=1';
var rcs0 = document.getElementsByTagName('script')[0];
rcs0.parentNode.insertBefore(rcs, rcs0);
})();
Expand Down
2 changes: 0 additions & 2 deletions src/modules/Phone/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,6 @@ export function createPhone({
disableReadText,
disableConferenceInvite,
disableGlip,
disableConferenceCall,
disableMeeting,
userAgent,
analyticsKey,
Expand Down Expand Up @@ -698,7 +697,6 @@ export function createPhone({
disableMessages,
disableConferenceInvite,
disableGlip,
disableConferenceCall,
disableMeeting,
disableReadText,
},
Expand Down
2 changes: 1 addition & 1 deletion src/modules/RolesAndPermissions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class NewRolesAndPermissions extends RolesAndPermissions {
}

get hasConferenceCallPermission() {
return super.hasConferenceCallPermission && !this._disableConferenceCall;
return super.hasConferenceCallPermission && this.hasActiveCallControlPermission;
}

get hasActiveCallControlPermission() {
Expand Down

0 comments on commit e8e568e

Please sign in to comment.