Git Product home page Git Product logo

talkie.lol's Introduction

Talkie.LOL

Build Status code style: prettier

Talkie is a free, open-source, secure, peer-to-peer video chat app that you can use to talk to your friends.

Try it here!

Quick Overview

Talkie is a side-project that I use to play with WebRTC and brand new Web APIs. Talkie uses :

Category API Used for...
WebRTC RtcPeerconnection Creating peer to peer connections
WebRTC Data Channels Sending messages and images
WebRTC MediaDevices / enumerateDevices Selecting audio and video sources
WebRTC MediaDevices/ getUserMedia Stream the user audio / video
WebRTC MediaDevices / getDisplayMedia Share the user screen
PictureInPicture Video / requestPictureInPicture Enable picture in picture for a user
Clipboard writeText Copy the space link
Clipboard write Copy the space QR code
Clipboard paste event Send images from the clipboard over data channels
Canvas captureStream (Experiment) Merge all streams to a canvas
Canvas toBlob To copy a canvas to the clipboard
WebAudio AnalyzerNode Detect sound and silence
Navigator Connection Detect connection type
PWA Service Workers Installing Talkie on your device!

Stack

Signaling server

The source code can be found here.

The signaling server is a GraphQL API, written using :

  • โœ… TypeScript
  • ๐Ÿš€ Apollo server as a GraphQL server
  • ๐Ÿ„บ Koa
  • โ™ป๏ธ Dependency Injection using Awilix
  • ๐Ÿ“ฆ Redis as a database / pubsub

Web app

The source code can be found here.

The frontend is a React app using :

This project extensively uses new APIs such as CSS Grid or CSS custom properties.

Development environment

Requirements

To run this project locally, you will need

  • Docker and docker-compose
  • Yarn
  • A version of Node supported by create-react-app.

Running locally

To start the app :

  • Install dependencies using yarn in the project root
  • Run docker-compose up in the project root (this will start Redis and the signaling server in watch mode using ts-node)
  • Run yarn start in the packages/web directory (this will start the front-end)

Deployment

# Configure the remote machine (install Nginx and Docker)
ansible-playbook infra/playbooks/install.yml

# Configure the reverse proxy
ansible-playbook infra/playbooks/reverse_proxy.yml

# Deploy the app
ansible-playbook infra/playbooks/talkie.yml

talkie.lol's People

Contributors

antoinechalifour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

talkie.lol's Issues

Use proper STUN servers

Right now I just picked some random server from a gist. I guess I could deploy a STUN server to Heroku or use a dedicated service like Twilio.

Feature detection

WebRTC

  • Use window.RTCConnection to detect whether WebRTC is available
  • Redirect to an error page when the browser does not support WebRTC

Clipboard API

Clipboard API is part of progressive enhancement

  • Use navigator.clipboard to detech whether the clipboard API is available
  • Hide the "share button" when this feature is not supported

Picture in Picture

PinP is part of progressive enhancement.

  • Use document.pictureInPictureEnabled to detect whether picture in picture can be used
  • Hide the picture in picture button when PinP is not supported

Add a chat

Add a chat using Data Channels, a WebRTC feature for sharing binary data.

Add "reactions"

Add "reactions" (like clap, thumbs up, ...)

Maybe custom reactions as well ?

Video filters

This is very experimental and I'm not really sure what to implement, but using the same trick as the picture-in-picture task, we can manipulate the stream in a canvas.

So we could add things like :

  • black & white video
  • sepia video
  • green screen integration ?

Let's just be creative

Let the web app handle peers leaving the space

Right now the servers listens for disconnections to trigger the SPACE_LEFT events. But the WS disconnects quite often which kicks peers out of the space.

A solution is to remote the SPACE_LEFT event, mutation and subscription to let the web app listen to the signaling state

Picture-in-picture for everyone

Enable picture-in-picture for showing the conference when the tab is not focused.

As of now, only HtmlVideoElement can use the requestPictureInPicture API, but there is a workaround !

We can actually render multiple videos in a canvas element, and use canvas.streamCapture(fps) to get the stream and use it in a single video element that will be used for PIP.

A POC is available in the branche picture-in-picture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.