forked from Cross-Lab-Project/module-video-chat-jitsi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (40 loc) · 1.84 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Live video chat module based on Jitsi" />
<meta name="show-in" content="*" />
<title>Video Chat</title>
<script src="https://edrys-labs.github.io/module/edrys.js"></script>
<script defer src="https://edrys-labs.github.io/module/vendor/alpine.min.js"></script>
</head>
<body>
<template x-if="!!edrys && !!url" x-data="{ edrys: undefined, url: undefined }"
x-init="Edrys.onUpdate((e) => {
edrys = {...e}
let room = edrys.liveRoom.name.replace(/[\W_]+/g, '')
let instance = edrys.module.config?.instance || 'https://meet.jit.si'
let config = `&userInfo.displayName=%22${encodeURIComponent(edrys.liveUser.displayName)}%22`;
config += '&config.prejoinPageEnabled=false';
config += `&config.subject=%22${room}%22`;
config += edrys.module.config?.config || '';
config += edrys.module[edrys.role.toLowerCase()+'Config']?.config || '';
url = `${instance}/edrys-${encodeURIComponent(room)}-${edrys.class_id}#${config}`
})">
<iframe :src="url" frameborder="0" style="width:100%;height:100%;" allow="camera; microphone; fullscreen; display-capture;" ></iframe>
</template>
<style>
body, html, iframe {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
overflow: hidden;
}
</style>
</body>
</html>