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
import cmdLineArgs from 'command-line-args'; | |
import mediasoup from 'mediasoup'; | |
import WebSocket from 'ws'; | |
import { | |
remove, | |
find, | |
sortBy, | |
reverse, | |
} from 'lodash'; |
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
<html> | |
<head> | |
<title>embedded video call</title> | |
</head> | |
<body style="background: -webkit-gradient(linear, left top, left bottom, | |
from(#23cb40), to(#aaaaaa)) fixed;"> | |
<iframe | |
allow="camera,microphone,display" | |
src="https://kwindla.daily.co/hello" | |
height="75%" width="40%" |
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, |
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
// 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
<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
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
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 |
OlderNewer