Skip to content

Commit

Permalink
feat: add api to toggle ringing dialog (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
embbnux authored Dec 19, 2024
1 parent 04a7769 commit a031da7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/integration/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
}, '*');
```

### Close/open current ringing page

<!-- md:version 2.2.1 -->

```js
document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
type: 'rc-adapter-control-call',
callAction: 'toggleRingingDialog',
}, '*');

## Embeddable widget

### Show custom alert message
Expand Down
3 changes: 3 additions & 0 deletions src/modules/Adapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,9 @@ export default class Adapter extends AdapterModuleCore {
case 'unmute':
this._webphone.unmute(id || this._webphone.activeSessionId);
break;
case 'toggleRingingDialog':
this._webphone.toggleMinimized(id || this._webphone.ringSessionId);
break;
default:
break;
}
Expand Down

0 comments on commit a031da7

Please sign in to comment.