Skip to content

Instantly share code, notes, and snippets.

@kwindla
Created March 10, 2019 22:00
Show Gist options
  • Save kwindla/41b4e2c935828a90490b9b74aca45593 to your computer and use it in GitHub Desktop.
Save kwindla/41b4e2c935828a90490b9b74aca45593 to your computer and use it in GitHub Desktop.
transform our button into a "leave call" button
let button = document.getElementById('start-call-button');
button.innerHTML = 'end call';
button.onclick = () => {
document.body.removeChild(iframeEl);
iframeEl.src = null;
button.innerHTML = 'start call';
button.onclick = startCall;
// window.location.origin is this page's url
// without the hash fragment
window.location = window.location.origin
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment