-
-
Save zaxebo1/fb4a3e94af857c67f27abe6b60a4fce0 to your computer and use it in GitHub Desktop.
Jitsi : enable videoconference at a specific time
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
// using jitsi API: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe | |
<script src='https://meet.jit.si/external_api.js'></script> | |
<script> | |
const domain = 'meet.jit.si'; | |
const options = { | |
roomName: 'JitsiMeetAPIExample', | |
width: '1200px', | |
height: '800px', | |
parentNode: document.querySelector('#conference') | |
}; | |
console.log(domain); | |
console.log(options); | |
var target = new Date(Date.UTC(2020,4,29,14,59,00)); | |
timeOffset = target.getTimezoneOffset() * 60000; | |
targetTime = target.getTime(); | |
targetUTC = targetTime + timeOffset; | |
var today = new Date(); | |
todayTime = today.getTime(); | |
todayUTC = todayTime + timeOffset; | |
refreshTime = (targetUTC - todayUTC); | |
if (refreshTime > 1) { | |
setTimeout(function() { const api = new JitsiMeetExternalAPI(domain, options); }, refreshTime); | |
} else { | |
const api = new JitsiMeetExternalAPI(domain, options); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment