This file contains hidden or 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
| async function checkForFaces() { | |
| try { | |
| if (callFrame.meetingState() !== 'joined-meeting') { | |
| return; | |
| } | |
| // remove all bounding boxes | |
| for (let el of document.getElementsByClassName('face-boxes')) { | |
| el.remove(); | |
| } | |
| // detect faces |
This file contains hidden or 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
| style { | |
| .testClass { | |
| background-color: red; | |
| } | |
| } |
This file contains hidden or 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 |
This file contains hidden or 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
| const createRoomEndpoint = 'https://create-a-room--kwindla.repl.co'; | |
| async function startCall(callUrl) { | |
| if (!callUrl) { | |
| let response = await fetch(createRoomEndpoint), | |
| roomData = await response.json(); | |
| callUrl = roomData.url; | |
| } | |
| let iframeEl = document.createElement('iframe'); |
This file contains hidden or 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
| <body onload="maybeJoinCall()"> | |
| function maybeJoinCall() { | |
| if (window.location.hash) { | |
| startCall(window.location.hash.substring(1)); | |
| } | |
| } |
This file contains hidden or 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; |
This file contains hidden or 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
| # create a new video call room, with a random name, | |
| # that expires 60 seconds from now | |
| # | |
| curl -H "Content-Type: application/json" \ | |
| -H "Authorization: Bearer $YOUR_API_TOKEN" \ | |
| -XPOST -d \ | |
| '{"properties":{"exp":'`expr $(date +%s) + 60`'}}' \ | |
| https://api.daily.co/v1/rooms/ |
This file contains hidden or 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
| export const plans = { | |
| PLAN001A: { | |
| monthlyCost: 0, | |
| monthlyMinutesIncluded: 2000, | |
| monthlyMinutesCap: 2000, | |
| maxRoomParticipants: 2, | |
| maxApiRooms: 5 | |
| }, | |
| PLAN049A: { | |
| monthlyCost: 49, |