-
Notifications
You must be signed in to change notification settings - Fork 609
/
index.html
executable file
·177 lines (163 loc) · 6.46 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta
name="viewport"
content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<meta
name="description"
content="A free, peer-to-peer, encrypted, open-source video calling for the web. No sign ups. No downloads."
/>
<meta
name="keywords"
content="group video chat, video communication, multiparty video chat, video chat, webrtc, peer to peer, p2p"
/>
<meta name="application-name" content="Talk" />
<!-- Meta data for link fetching -->
<meta property="og:url" content="https://vasanthv.github.io/talk/" />
<meta property="og:image" content="https://vasanthv.github.io/talk/icons/icon.png" />
<meta property="og:title" content="Talk - Free video calling for the web" />
<meta
property="og:description"
content="A free, peer-to-peer, encrypted, open-source video calling for the web. No sign ups. No downloads."
/>
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png" />
<link rel="icon" href="icons/favicon.svg" />
<link rel="stylesheet" href="styles.css" />
<script defer src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script
src="https://cdn.socket.io/4.7.5/socket.io.min.js"
integrity="sha384-2huaZvOR9iDzHqslqwpR87isEmrfxqyWOF7hr7BY6KG0+hVKLoEXMPUJw3ynWuhO"
crossorigin="anonymous"
></script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script defer src="script.js"></script>
<script defer src="webrtc.js"></script>
<title>Talk - Free video calling for the web</title>
<!-- ANALYTICS_SCRIPT: Please remove it for your use -->
<script async defer src="https://scripts.withcabin.com/hello.js"></script>
</head>
<body>
<section id="blanket"></section>
<section id="videos"></section>
<main id="app">
<div id="appWrap" v-bind:style="'display:block;'">
<div id="intro" v-if="!callInitiated && !showChat && !showSettings">
<h1>Talk</h1>
<p>A free, peer-to-peer, encrypted, open-source video calling for the web.</p>
<p>
<label for="roomId">Room Id:</label>
<input type="text" id="roomId" v-model="roomId" placeholder="Enter a room id" />
</p>
<p>
<label for="yourName">Your name</label>
<input type="text" id="yourName" v-model="name" v-on:keyup="updateName" placeholder="Enter your name" />
</p>
<br />
<div class="footer">
<iframe
src="https://ghbtns.com/github-btn.html?user=vasanthv&repo=talk&type=star&count=true&size=large"
frameborder="0"
scrolling="0"
width="170"
height="30"
title="GitHub"
></iframe>
<button v-on:click="initiateCall">Proceed</button>
</div>
</div>
<div id="callFeedbackWrap" v-if="callEnded">
<div id="callFeedback">
<div class="bold">Your call has been disconnected. You can now close this window.</div>
<br />
<div id="feedbackWrap">
<div class="question italic">How was the quality of call?</div>
<div class="thankYou bold">Thank you for your feedback</div>
<div id="feedbackButtons">
<button data-cabin-event="call-quality-nah" v-on:click="onCallFeedback">😟<br />Nah!</button>
<button data-cabin-event="call-quality-meh" v-on:click="onCallFeedback">😐<br />Meh!</button>
<button data-cabin-event="call-quality-yay" v-on:click="onCallFeedback">😀<br />Yay!</button>
</div>
</div>
</div>
</div>
<div id="chatWrap" v-if="showChat">
<div id="chats" ref="chatContainer">
<div class="chat" v-for="(chat, i) in chats" v-bind:key="i">
<span class="name">{{chat.name}}</span>
<span class="date light"> · {{formatDate(chat.date)}}</span>
<div class="message" v-html="linkify(chat.message)"></div>
</div>
<div id="noChat" class="light" v-if="!chats.length"><small>No chat messages.</small></div>
</div>
<div id="composeBox">
<div id="placeholder" v-if="typing.length <= 0">Type message...</div>
<div
id="compose"
contenteditable="true"
v-on:keydown.enter="sendChat"
v-on:input="edit($event)"
v-on:paste="paste($event)"
></div>
</div>
<small class="light">Press enter to submit</small>
</div>
<div id="settings" v-if="showSettings">
<div id="name" class="label">
<span>Name:</span>
<input type="text" placeholder="Enter your name" v-model="name" v-on:keyup="updateNameAndPublish" />
</div>
<hr class="separator" />
<div class="label">Camera 📹</div>
<div v-for="(videoDevice, i) in videoDevices" v-bind:key="videoDevice.deviceId">
<div
v-bind:class="'link indent '+(selectedVideoDeviceId === videoDevice.deviceId ? 'active' : '')"
v-on:click="changeCamera(videoDevice.deviceId)"
>
{{videoDevice.label}}
</div>
</div>
<hr class="separator" />
<div class="label">Microphone 🎙️</div>
<div v-for="(audioDevice, i) in audioDevices" v-bind:key="audioDevice.deviceId">
<div
v-bind:class="'link indent '+(selectedAudioDeviceId === audioDevice.deviceId ? 'active' : '')"
v-on:click="changeMicrophone(audioDevice.deviceId)"
>
{{audioDevice.label}}
</div>
</div>
<hr class="separator" />
<div class="link" v-on:click="copyURL">{{copyText || "Copy room link"}}</div>
<hr class="separator" />
<div class="link" v-on:click="toggleSelfVideoMirror">
Mirror / Unmirror
<small class="light">(self-view)</small>
</div>
</div>
<div id="actionsWrap" v-if="callInitiated">
<div id="actions">
<button v-bind:class="'icon-mic'+(audioEnabled ? '' : '-off')" v-on:click="audioToggle"></button>
<button v-bind:class="'icon-video'+(videoEnabled ? '' : '-off')" v-on:click="videoToggle"></button>
<button
v-bind:class="'icon-message-square '+(showChat ? 'active' : '')"
v-on:click="showChat = !showChat"
></button>
<button
v-if="!isMobileDevice"
v-bind:class="'icon-monitor '+(screenShareEnabled ? 'active' : '')"
v-on:click="screenShareToggle"
></button>
<button v-bind:class="'icon-exit'" v-on:click="exit"></button>
<button
v-bind:class="'icon-more-horizontal '+(showSettings ? 'active' : '')"
v-on:click="showSettings = !showSettings"
></button>
</div>
</div>
</div>
</main>
</body>
</html>