Iframe-integratie
1. Voeg deze HTML-code toe aan uw document. U kunt dit in een andere <div> plaatsen om de gewenste stijl toe te passen op de manier waarop de iframe in uw app moet verschijnen.
<iframe
src="our provided link"
id="tmgc-iframe"
allow="camera; microphone"
loading="lazy"
>
</iframe> 2. Voeg deze CSS-code toe aan uw stylesheet.
iframe {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: none;
display: block;
} 3. Voeg deze code toe aan uw script. Roep deze functie aan zodra de pagina met de iframe wordt geladen (mounts) in uw app.
window.addEventListener('message', (event) => {
if (event.data.type === 'tmgc-close-session') {
// fire the function to close the iframe here
}
})