Iframe Integration
1. Add this HTML code to your document. You can wrap this in another <div> to apply the desired style that you want the iframe to appear in your app.
<iframe
src="our provided link"
id="tmgc-iframe"
allow="camera; microphone"
loading="lazy"
>
</iframe> 2. Add this CSS code to your stylesheet.
iframe {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: none;
display: block;
} 3. Add this code to your script. Call this function when the page which contains the iframe mounts in your app.
window.addEventListener('message', (event) => {
if (event.data.type === 'tmgc-close-session') {
// fire the function to close the iframe here
}
})