Merge pull request #4 from questo-ai/master

Update fixes
This commit is contained in:
Arya Vohra 2020-05-31 23:04:38 +08:00 committed by GitHub
commit 1d48b6d7ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 21 deletions

2
README.md vendored
View File

@ -20,12 +20,14 @@ technology.
<img align="right" width="400" height="auto" src="public/images/preview.gif"> <img align="right" width="400" height="auto" src="public/images/preview.gif">
- Screen sharing - Screen sharing
- Group call with up to 4 peers
- Picture in picture - Picture in picture
- Live captions - Live captions
- Text chat - Text chat
- Auto-scaling video quality - Auto-scaling video quality
- No download required, entirely browser based - No download required, entirely browser based
- Direct peer to peer connection ensures lowest latency - Direct peer to peer connection ensures lowest latency
- No SFU servers, group calls use mesh networks
- Single use disposable chat rooms - Single use disposable chat rooms
## Quick start ## Quick start

View File

@ -195,7 +195,16 @@ var VideoChat = {
logIt("connected"); logIt("connected");
break; break;
case "disconnected": case "disconnected":
logIt("disconnected"); logIt("disconnected - UUID " + uuid);
VideoChat.remoteVideoWrapper.removeChild(document.querySelectorAll(`[uuid="${uuid}"]`)[0]);
VideoChat.connected.delete(uuid);
VideoChat.peerConnections.delete(uuid);
dataChannel.delete(uuid);
if (VideoChat.peerConnections.size === 0) {
displayWaitingCaption();
}
break;
case "failed": case "failed":
logIt("failed"); logIt("failed");
// VideoChat.socket.connect // VideoChat.socket.connect
@ -332,6 +341,7 @@ var VideoChat = {
node.setAttribute("autoplay", ""); node.setAttribute("autoplay", "");
node.setAttribute("playsinline", ""); node.setAttribute("playsinline", "");
node.setAttribute("id", "remote-video"); node.setAttribute("id", "remote-video");
node.setAttribute("uuid", uuid);
VideoChat.remoteVideoWrapper.appendChild(node); VideoChat.remoteVideoWrapper.appendChild(node);
// Update remote video source // Update remote video source
VideoChat.remoteVideoWrapper.lastChild.srcObject = event.stream; VideoChat.remoteVideoWrapper.lastChild.srcObject = event.stream;
@ -893,7 +903,15 @@ function togglePictureInPicture() {
); );
} }
} }
//Picture in picture
// Helper function for displaying waiting caption
function displayWaitingCaption() {
// Set caption text on start
captionText.text("Waiting for other user to join...").fadeIn();
// Reposition captions on start
rePositionCaptions();
}
function startUp() { function startUp() {
// Try and detect in-app browsers and redirect // Try and detect in-app browsers and redirect
@ -987,11 +1005,7 @@ function startUp() {
}, },
}); });
// Set caption text on start displayWaitingCaption();
captionText.text("Waiting for other user to join...").fadeIn();
// Reposition captions on start
rePositionCaptions();
// On change media devices refresh page and switch to system default // On change media devices refresh page and switch to system default
navigator.mediaDevices.ondevicechange = () => window.location.reload(); navigator.mediaDevices.ondevicechange = () => window.location.reload();

26
public/landing.html vendored
View File

@ -67,9 +67,9 @@
class="mt-0 mb-32 reveal-from-bottom" class="mt-0 mb-32 reveal-from-bottom"
data-reveal-delay="300" data-reveal-delay="300"
> >
Simple, Secure, and Fast. Peer to peer video calling Simple, Secure, and Fast. Peer to peer group video
provides quality and latency simply not available with calling provides quality and latency simply not
traditional technology. available with traditional technology.
</p> </p>
<div class="reveal-from-bottom" data-reveal-delay="450"> <div class="reveal-from-bottom" data-reveal-delay="450">
<a <a
@ -191,18 +191,19 @@
<div class="features-tiles-item-header"> <div class="features-tiles-item-header">
<div class="features-tiles-item-image mb-16"> <div class="features-tiles-item-image mb-16">
<img <img
src="images/feature-tile-icon-03.svg" src="images/feature-tile-icon-06.svg"
alt="Feature tile icon 03" alt="Feature tile icon 06"
width="72" width="72"
height="72" height="72"
/> />
</div> </div>
</div> </div>
<div class="features-tiles-item-content"> <div class="features-tiles-item-content">
<h4 class="mt-0 mb-8">Total Privacy</h4> <h4 class="mt-0 mb-8">Decentralized group calls</h4>
<p class="m-0 text-sm"> <p class="m-0 text-sm">
Each chat is single use, data stays between you and your Zipcall lets you talk to up to four friends by
caller. Zipcall is built privacy first. directly connecting to them, completely
decentralized.
</p> </p>
</div> </div>
</div> </div>
@ -236,17 +237,18 @@
<div class="features-tiles-item-header"> <div class="features-tiles-item-header">
<div class="features-tiles-item-image mb-16"> <div class="features-tiles-item-image mb-16">
<img <img
src="images/feature-tile-icon-06.svg" src="images/feature-tile-icon-03.svg"
alt="Feature tile icon 06" alt="Feature tile icon 03"
width="72" width="72"
height="72" height="72"
/> />
</div> </div>
</div> </div>
<div class="features-tiles-item-content"> <div class="features-tiles-item-content">
<h4 class="mt-0 mb-8">Maximum Security</h4> <h4 class="mt-0 mb-8">Total Privacy and Security</h4>
<p class="m-0 text-sm"> <p class="m-0 text-sm">
End to end state of the art encryption means your calls Zipcall is built privacy first. Each chat is single use,
and end to end state of the art encryption means your calls
are exactly that. Your calls. are exactly that. Your calls.
</p> </p>
</div> </div>

View File

@ -8,7 +8,6 @@ var twillioAccountSID =
var twilio = require("twilio")(twillioAccountSID, twillioAuthToken); var twilio = require("twilio")(twillioAccountSID, twillioAuthToken);
var express = require("express"); var express = require("express");
var app = express(); var app = express();
const fs = require("fs");
var http = require("http").createServer(app); var http = require("http").createServer(app);
var io = require("socket.io")(http); var io = require("socket.io")(http);
var path = require("path"); var path = require("path");