diff --git a/src/components/Calls/CallIFrame.js b/src/components/Calls/CallIFrame.js index 64bac7d6c..bc68c0ed0 100644 --- a/src/components/Calls/CallIFrame.js +++ b/src/components/Calls/CallIFrame.js @@ -7,8 +7,19 @@ import styles from './styles.scss'; export const CallIframe = () => { - const { token, room } = store.state; - const url = `${ Livechat.client.host }/meet/${ room._id }?token=${ token }`; + const { token, room, incomingCallAlert, ongoingCall } = store.state; + const url = `${ Livechat.client.host }/meet/${ room._id }?token=${ token }&layout=embedded`; + window.handleIframeClose = () => store.setState({ incomingCallAlert: { ...incomingCallAlert, show: false } }); + window.expandCall = () => { + window.open( + `${ Livechat.client.host }/meet/${ room._id }?token=${ token }`, + room._id, + ); + return store.setState({ + incomingCallAlert: { ...incomingCallAlert, show: false }, + ongoingCall: { ...ongoingCall, callStatus: 'ongoingCallInNewTab' }, + }); + }; return (