Giter Site home page Giter Site logo

ryszard-suchocki / laplace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adamyordan/laplace

0.0 0.0 0.0 1.59 MB

Laplace is an open-source project to enable screen sharing directly via browser. Based on WebRTC for low latency peer-to-peer connections, and WebSocket implemented in golang for signaling.

Home Page: https://laplace.adamjordan.id/

License: MIT License

Go 37.35% HTML 14.47% Dockerfile 0.86% CSS 3.24% JavaScript 44.08%

laplace's Introduction

Laplace

Laplace is an open-source project to enable screen sharing directly via browser. Made possible using WebRTC for low latency peer-to-peer connections, and WebSocket implemented in golang for WebRTC signaling.

Demo video: https://youtu.be/E8cUaPrAlzE

Laplace for gaming

Try Demo

For demo, you can visit https://laplace.madeby.monster/

Website screenshot

Motivation

There are already possible solutions to share your computer screen, e.g. TeamViewer. But most of them require installations of software or plugins. What Laplace provides is a simple solution to this problem. For users wanting to share their screen, all they need to do is to open a website page with their browsers, clicking some buttons, then share some session ID with their peers. No installation or registration required.

Solving the latency problem

This project also serves as a proof-of-concept (PoC) for screen sharing capability directly in browsers based on WebRTC. Using WebRTC, real-time communication is made possible through peer-to-peer connections. This proves to be very useful in solving one of the biggest problems is screen streaming: Latency. The latency represents how long the delay is from the source to transmit to the remote client. If you notice, this latency problem is usually highlighted by game streaming services, since gameplay relies heavily on the interactivity of inputs and outputs.

Low server cost

This solution also solves the server cost problem, since the expensive operations (encoding and transmission) are done on client browsers. The server is only needed for serving frontends and for WebRTC signaling.

Possible Use Cases

  • Game streaming from PC to mobile devices.
  • Collaborative work where you need to share your screen with remote coworkers.
  • Mirroring presentation slides and demonstrations.

Installation

Build from source

$ git clone https://github.com/adamyordan/laplace.git
$ cd laplace && go build -o laplace main.go
$ ./laplace --help

OR, pull the pre-built docker image

$ docker pull adamyordan/laplace
$ docker run adamyordan/laplace ./laplace --help

Program Execution

Executing this project basically serves an HTTP server that will host the frontend and the WebSocket implementation. Note that you sometimes need to run HTTPs in order for browser to connect to websocket.

$ ./laplace --help
  -addr string
        Listen address (default "0.0.0.0:443")
  -certFile string
        TLS cert file (default "files/server.crt")
  -keyFile string
        TLS key file (default "files/server.key")
  -tls
        Use TLS (default true)

By default, you can run the executable without any argument to listen to TLS port 443. A self-signed certificate files are provided to ease up development.

$ ./laplace
2020/03/25 01:01:10 Listening on TLS: 0.0.0.0:443

You can then open https://localhost:443/ to view Laplace page. You may need to add certificate exceptions. In Chrome, you can type thisisunsafe.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

laplace's People

Contributors

adamyordan avatar

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.