Created
March 10, 2019 21:54
-
-
Save kwindla/5fb9dd5038f2b103ed9208424d420ae1 to your computer and use it in GitHub Desktop.
create a new room and join it
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
// you can replace this with your own repl.it endpoint URL! | |
const createRoomEndpoint = 'https://create-a-room--kwindla.repl.co' | |
async function startCall() { | |
let response = await fetch(createRoomEndpoint), | |
roomData = await response.json(), | |
callUrl = roomData.url; | |
let iframeEl = document.createElement('iframe'); | |
iframeEl.width = 350; | |
iframeEl.height = 425; | |
iframeEl.style.position = 'absolute'; | |
iframeEl.style.right = '1em'; | |
iframeEl.style.bottom = '3em'; | |
iframeEl.src = callUrl; | |
iframeEl.allow="camera; microphone; autoplay"; | |
document.body.appendChild(iframeEl); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment