From 622439c2d3c47fc45f759ef3159bcb5c6acb440e Mon Sep 17 00:00:00 2001 From: Dhruv Jain Date: Sat, 14 Aug 2021 01:30:55 +0530 Subject: [PATCH 1/8] [NEW] Handle endCall and expandView control buttons --- src/components/Calls/CallIFrame.js | 12 +++++++++++- src/routes/Chat/component.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/Calls/CallIFrame.js b/src/components/Calls/CallIFrame.js index 64bac7d6c..49d7d53ee 100644 --- a/src/components/Calls/CallIFrame.js +++ b/src/components/Calls/CallIFrame.js @@ -8,7 +8,17 @@ import styles from './styles.scss'; export const CallIframe = () => { const { token, room } = store.state; - const url = `${ Livechat.client.host }/meet/${ room._id }?token=${ token }`; + const url = `${Livechat.client.host}/meet/${room._id}?token=${token}&layout=embedded`; + window.handleIframeClose = async () => { + return await store.setState({ incomingCallAlert: null }); + }; + window.expandCall = async () => { + window.open( + `${Livechat.client.host}/meet/${room._id}?token=${token}`, + room._id + ); + return await store.setState({ incomingCallAlert: null }); + }; return (