Created
March 10, 2019 22:00
-
-
Save kwindla/41b4e2c935828a90490b9b74aca45593 to your computer and use it in GitHub Desktop.
transform our button into a "leave call" button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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