Using an iframe in wix.com or other website builders with a nested iframe

Like many on-screen "no-code" website builders, the Wix HTML widget uses an embedded iframe. This means you'll need to make one slight modification to the embed code provided to you within a Samba Live meeting.

To get Samba Live to work within a nested iframe, you also have to input allow=“camera,microphone” at the end of the body tag as follows:

var iframes = document.querySelectorAll(“iframe”); // finds all iframes
for (var i = 0; i < iframes.length; i++) {
var name = iframes[i].getAttribute(“name”)
if (name.includes(“htmlComp”)) {
iframes[i].setAttribute(“allow”, “microphone; camera”)
}
}