Group peer to peer video calls for everyone written in Go and TypeScript

Peer Calls v4

Peer Calls CI Go Report Card

WebRTC peer to peer calls for everyone. See it live in action at peercalls.com.

The server has been completely rewriten in Go and all the original functionality works. An optional implementation of a Selective Forwarding Unit (SFU) is available to make Peer Calls consume less bandwith for user video uploads. This wouldn't haven been possible without the awesome pion/webrtc library.

The config file format is still YAML, but is different than what was in v3. The v3 source code is available in version-3 branch. Version 4 will no longer be published on NPM since the server is no longer written in NodeJS.

What's New in v4

  • Core rewritten in Golang.
  • Selective Forwarding Unit. Can be enabled using NETWORK_TYPE=sfu environment variable. The peercalls.com instance has this enabled.
  • Ability to change video and audio devices without reconnecting.
  • Improved toolbar layout. Can be toggled by clicking or tapping.
  • Multiple videos are now shown in a full-size grid and each can be minimized.
  • Video cropping can be turned off.
  • Improved file sending. Users are now able to send files larger than 64 or 256 KB (depends on the browser).
  • Device names are correctly populated in the dropdown list.
  • Improved desktop sharing.
  • Copy invite link to clipboard. Will show as share icon on devices that support it.
  • Fix: Toolbar icons render correctly on iOS 12 devices.
  • Fix: Video autoplays.
  • Fix: Toolbar is no longer visible until call is joined
  • Fix: Add warning when using an unsupported browser
  • Fix: Add warning when JavaScript is disabled

TODO for Selective Forwarding Unit

  • Support dynamic adding and removing of streams
  • Support RTCP packet Picture Loss Indicator (PLI)
  • Support RTCP packet Receiver Estimated Maximum Bitrate (REMB)
  • Add handling of other RTCP packets besides NACK, PLI and REMB
  • Add JitterBuffer (experimental, currently without congestion control)
  • Support multiple Peer Calls nodes when using SFU
  • Add support for passive ICE TCP candidates
  • End-to-End Encryption (E2EE) using Insertable Streams. See #142.

Requirements for Development

Alternatively, Docker can be used to run Peer Calls.

Stack

Backend

See go.mod for more information

Frontend

  • React
  • Redux
  • TypeScript (since peer-calls v2.1.0)

See package.json for more information.

Installation & Running

Download Release

Head to Releases and download a precompiled version. Currently the binaries for the following systems are built automatically:

  • linux amd64
  • linux arm
  • darwin (macOS) amd64
  • windows amd64

Deploying onto Kubernetes

The root of this repository contains a kustomization.yaml, allowing anyone to patch the manifests found within the deploy/ directory. To deploy the manifests without applying any patches, pass the URL to kubectl:

kubectl apply -k github.com/peer-calls/peer-calls

Using Docker

Use the peercalls/peercalls image from Docker Hub:

docker run --rm -it -p 3000:3000 peercalls/peercalls:latest

Building from Source

git clone https://github.com/peer-calls/peer-calls.git
cd peer-calls
npm install

# for production
npm run build
npm run build:go:linux

# for development
npm run start

Building Docker Image

git clone https://github.com/peer-calls/peer-calls
cd peer-calls
docker build -t peer-calls .
docker run --rm -it -p 3000:3000 peer-calls

Configuration

Environment variables

Variable Type Description Default
PEERCALLS_LOG csv Enables or disables logging for certain modules -sdp,-ws,-nack,-rtp,-rtcp,-pion:*:trace,-pion:*:debug,-pion:*:info,*
PEERCALLS_FS string When set to a non-empty value, use the path to find resource files
PEERCALLS_BASE_URL string Base URL of the application
PEERCALLS_BIND_HOST string IP to listen to 0.0.0.0
PEERCALLS_BIND_PORT int Port to listen to 3000
PEERCALLS_TLS_CERT string Path to TLS PEM certificate. If set will enable TLS
PEERCALLS_TLS_KEY string Path to TLS PEM cert key. If set will enable TLS
PEERCALLS_STORE_TYPE string Can be memory or redis memory
PEERCALLS_STORE_REDIS_HOST string Hostname of Redis server
PEERCALLS_STORE_REDIS_PORT int Port of Redis server
PEERCALLS_STORE_REDIS_PREFIX string Prefix for Redis keys. Suggestion: peercalls
PEERCALLS_NETWORK_TYPE string Can be mesh or sfu. Setting to SFU will make the server the main peer mesh
PEERCALLS_NETWORK_SFU_INTERFACES csv List of interfaces to use for ICE candidates, uses all available when empty
PEERCALLS_NETWORK_SFU_JITTER_BUFFER bool Set to true to enable the use of Jitter Buffer false
PEERCALLS_NETWORK_SFU_PROTOCOLS csv Can be udp4, udp6, tcp4 or tcp6 udp4,udp6
PEERCALLS_NETWORK_SFU_TCP_BIND_ADDR string ICE TCP bind address. By default listens on all interfaces.
PEERCALLS_NETWORK_SFU_TCP_LISTEN_PORT int ICE TCP listen port. By default uses a random port. 0
PEERCALLS_NETWORK_SFU_TRANSPORT_LISTEN_ADDR string When set, will listen for external RTP, Data and Metadata UDP streams
PEERCALLS_NETWORK_SFU_TRANSPORT_NODES csv When set, will transmit media and data to designated host:port(s).
PEERCALLS_NETWORK_SFU_UDP_PORT_MIN int Defines ICE UDP range start to use for UDP host candidates. 0
PEERCALLS_NETWORK_SFU_UDP_PORT_MAX int Defines ICE UDP range end to use for UDP host candidates. 0
PEERCALLS_ICE_SERVER_URLS csv List of ICE Server URLs
PEERCALLS_ICE_SERVER_AUTH_TYPE string Can be empty or secret for coturn static-auth-secret config option.
PEERCALLS_ICE_SERVER_SECRET string Secret for coturn
PEERCALLS_ICE_SERVER_USERNAME string Username for coturn
PEERCALLS_PROMETHEUS_ACCESS_TOKEN string Access token for prometheus /metrics URL

The default ICE servers in use are:

  • stun:stun.l.google.com:19302
  • stun:global.stun.twilio.com:3478?transport=udp

Only a single ICE server can be defined via environment variables. To define more use a YAML config file. To load a config file, use the -c /path/to/config.yml command line argument.

See config/types.go for configuration types.

Example:

base_url: ''
bind_host: '0.0.0.0'
bind_port: 3005
ice_servers:
 - urls:
   - 'stun:stun.l.google.com:19302'
- urls:
  - 'stun:global.stun.twilio.com:3478?transport=udp'
#- urls:
#  - 'turn:coturn.mydomain.com'
#  auth_type: secret
#  auth_secret:
#    username: "peercalls"
#    secret: "some-static-secret"
# tls:
#   cert: test.pem
#   key: test.key
store:
  type: memory
  # type: redis
  # redis:
  #   host: localhost
  #   port: 6379
  #   prefix: peercalls
network:
  type: mesh
  # type: sfu
  # sfu:
  #   interfaces:
  #   - eth0
prometheus:
  access_token: "mytoken"

Prometheus /metrics URL will not be accessible without an access token set. The access token can be provided by either:

  • Setting Authorization header to Bearer mytoken, or
  • Providing the access token as a query string: /metrics?access_token=mytoken

To access the server, go to http://localhost:3000.

Accessing From Network

Most browsers will prevent access to user media devices if the application is accessed from the network (not via 127.0.0.1). If you wish to test your mobile devices, you'll have to enable TLS by setting the PEERCALLS_TLS_CERT and PEERCALLS_TLS_KEY environment variables. To generate a self-signed certificate you can use:

openssl req -nodes -x509 -newkey rsa:4096 -keyout key.pem -subj "/C=US/ST=Oregon/L=Portland/O=Company Name/OU=Org/CN=example.com" -out cert.pem -days 365

Replace example.com with your server's hostname.

Multiple Instances and Redis

Redis can be used to allow users connected to different instances to connect. The following needs to be added to config.yaml to enable Redis:

store:
  type: redis
  redis:
    host: redis-host  # redis host
    port: 6379        # redis port
    prefix: peercalls # all instances must use the same prefix

Logging

By default, Peer Calls server will log only basic information. Client-side logging is disabled by default.

Server-side logs can be configured via the PEERCALLS_LOG environment variable. Setting it to * will enable all server-side logging:

  • PEERCALLS_LOG=*

Client-side logs can be configured via localStorage.DEBUG and localStorage.LOG variables:

  • Setting localStorage.log=1 enables logging of Redux actions and state changes
  • Setting localStorage.debug=peercalls,peercalls:* enables all other client-side logging

Development

Below are some common scripts used for development:

npm start              build all resources and start the server.
npm run build          build all client-side resources.
npm run start:server   start the server
npm run js:watch       build and watch resources
npm test               run all client-side tests.
go test ./...          run all server tests
npm run ci             run all linting, tests and build the client-side

Browser Support

Tested on Firefox and Chrome, including mobile versions. Also works on Safari and iOS since version 11. Does not work on Microsoft Edge because they do not support DataChannels yet.

For more details, see here:

In Firefox, it might be useful to use about:webrtc to debug connection issues. In Chrome, use about:webrtc-internals.

When experiencing connection issues, the first thing to try is to have all peers to use the same browser.

Epheremal UDP Ports for ICE

The UDP port range can be defined for opening epheremal ports. These ports will be used for generating UDP host ICE candidates. It is recommended to enable these UDP ports when ICE TCP is enabled, because the priority of TCP host candidates will be higher than srflx/prflx candidates, as such TCP will be used even though UDP connectivity might be possible.

ICE TCP

Peer Calls supports ICE over TCP as described in RFC6544. Currently only passive ICE candidates are supported. This means that users whose ISPs or corporate firewalls block UDP packets can use TCP to connect to the SFU. In most scenarios, this removes the need to use a TURN server, but this functionality is currently experimental and is not enabled by default.

Add the tcp4 and tcp6 to your PEERCALLS_NETWORK_SFU_PROTOCOLS to enable support for ICE TCP:

PEERCALLS_NETWORK_TYPE=sfu PEERCALLS_NETWORK_SFU_PROTOCOLS=`udp4,udp6,tcp4,tcp6` peer-calls

To test this functionality, udp4 and udp6 network types should be omitted:

PEERCALLS_NETWORK_TYPE=sfu PEERCALLS_NETWORK_SFU_PROTOCOLS=`tcp4,tcp6` peer-calls

Please note that in production the PEERCALLS_NETWORK_SFU_TCP_LISTEN_PORT should be specified and external TCP access allowed through the server firewall.

TURN Server

When a direct connection cannot be established, it might be help to use a TURN server. The peercalls.com instance is configured to use a TURN server and it can be used for testing. However, the server bandwidth there is not unlimited.

Here are the steps to install a TURN server on Ubuntu/Debian Linux:

sudo apt install coturn

Use the following configuration as a template for /etc/turnserver.conf:

lt-cred-mech
use-auth-secret
static-auth-secret=p4ssw0rd
realm=example.com
total-quota=300
cert=/etc/letsencrypt/live/rtc.example.com/fullchain.pem
pkey=/etc/letsencrypt/live/rtc.example.com/privkey.pem
log-file=/dev/stdout
no-multicast-peers
proc-user=turnserver
proc-group=turnserver

Change the p4ssw0rd, realm and paths to server certificates.

Use the following configuration for Peer Calls:

iceServers:
- urls:
  - 'turn:rtc.example.com'
  auth_type: secret
  auth_secret:
    username: 'example'
    secret: 'p4ssw0rd'

Finally, enable and start the coturn service:

sudo systemctl enable coturn
sudo systemctl start coturn

Contributing

See Contributing section.

If you encounter a bug, please open a new issue!

Support

The development of Peer Calls is sponsored by rondomoon. If you'd like enterprise on-site support or become a sponsor, please contact [email protected].

If you wish to support future development of Peer Calls, you can donate here:

Donate

Thank you ❤️

License

Apache 2.0

Owner
Peer Calls
Peer Calls provides group peer-to-peer video and voice calls for everyone using WebRTC. Users can create private rooms and share the link.
Peer Calls
Comments
  • Unable to get this setup working on DO droplet

    Unable to get this setup working on DO droplet

    Hello ,

    I have setup peer calls running as a docker container on a Digital Ocean droplet. ( 1GB RAM , 1VCPU). We are testing it by using the desktop client from chrome ( not mobile client) only with 2-3 users so far. We can see each others name displayed in the meeting link but there is no audio or video at all. We tried with network setting as mesh and also sfu. Can someone help this is urgent thanks in advance?

  • Custom bandwidth

    Custom bandwidth

    Hello! I'm trying to build a multi-room video chat based on your code. I have a problem with video when more than 4-5 users come into the room at one time. I want to try set bandwidth on 250 kbps. Like in that demo. https://webrtc.github.io/samples/src/content/peerconnection/bandwidth/

    Can you help me to find a way to do it? Maybe some config, etc...

  • Aw Snap! in Chrome

    Aw Snap! in Chrome

    Hi, we recently (per haps a month) experience crashing tabs in Chromium based browsers while using Peer Calls in mesh mode. The crashes happen in the browser of a second client entering the room, about 1.5s after page load, less than 1s after the peer video streams appear correctly in both clients. Most often reproducable when the second client is a Chromebook, but also on Windows systems using latest Chrome (100+), say 1 in 10 reloads. In Chrome on Windows the tab says Aws Snap! STATUS_ACCESS_VIOLATION, on a Chromebook it is a SIGSEGV.

    WinDebug'ging the state does not give me any clue. Updating webrtc-adapter.js to latest 8.1 (which includes latest sdp) also didn't help. I searched through its issues as github, as well as those of simplepeer, and bugs.chromium.org (webrtc), but found nothing comparable. I also changed into using Google's stun server, turning of turn(s), etc. but doesn't matter. Disabling hardware acceleration, --disable-dev-shm-usage, etc. doesn;t help either.

    Since the peercalls website switched to sfu I cannot reproduce it over there. I hope you are willing to try to reproduce in a mesh setup. It demands patience filling out the forms every retry, if you are unable to reproduce quick enough please send me an email at dverspuij with domain cnsconnect dot nl, I can send you two urls with which two peers can enter a room instantly. Alternatively I can post or send you chrome_debug logs and peer calls server logs (with mesh sdp payloads) available for both a successful and crashed connection. They mostly hint towards differing sdp's (less tcp candidates for success) and less audio stuff for failure. It may have to do with setting up or handling of the audio streams? I did turn of the VUmeter and audio processing, but didn't help either.

    Thanks!

  • Don't work for public users, just for intranet

    Don't work for public users, just for intranet

    Describe the bug The website can be loaded, but if you want to join, there is an interruption

    Bug Report Checklist

    • [X] I have granted camera/microphone access permissions while testing
    • [x] This bug is reproducible on https://peercalls.com

    To Reproduce Steps to reproduce the behavior:

    1. Go to https://peer.crashlog.ch
    2. Click on "start session"
    3. Click on "join call"
    4. See error

    Expected behavior if I access from the local net via domain, then it works with several participants. As long as all participants are in the intranet it works well. If I come from outside, then it does not work.

    Screenshots not available.

    Desktop (please complete the following information):

    • OS: macOS 10.15.3
    • Browser safari
    • Version: latest

    Smartphone (please complete the following information):

    • Device: iPhone 11
    • OS: iOS 13.3.1
    • Browser stock browser, safari
    • Version: latest

    Additional context Server runs on port 3000 and is routed with HAProxy with SSL.

    I'm not a such "pro", but I couldn't find the error on my side, so I suppose, the error must be on your side.

  • Need help in passing the config yaml as a parameter

    Need help in passing the config yaml as a parameter

    Hi ,

    I see this from the README "Only a single ICE server can be defined via environment variables. To define more use a YAML config file. To load a config file, use the -c /path/to/config.yml command line argument"

    My question is for the above to work do i need to rebuild the binary. I want a self contained docker image that uses config yml and i don't want to pass the certs as command line arguments. In my docker file i changed the entrypoint to something like this _ENTRYPOINT ["/usr/local/bin/peer-calls","-c","/usr/local/bin/config.yml"]_ is this correct?

  • Lag in another peer call with SFU network mode

    Lag in another peer call with SFU network mode

    I tested out a call on sfu network mode. There happens to be lag and jitteriness in the video output of the other peer. Not Sure Why?

    I tested it out by pulling the repo down to my localhost, also tested out at peercalls.com as well. Having the issue in both cases.

  • Turn server config

    Turn server config

    Hi, I installed Coturn server and username and password are incorrect, i get 401 in server logs,

    While testing with Spreed-webrtc works fine..
    How do I set up coturn or peercalls to work together?

    Does peercall needs to hash the username, se this is what i got.

    57: session 002000000000000003: realm domain.com> user : incoming packet message processed, error 401: Unauthorised

  • npm install crashes

    npm install crashes

    Commands that I ran: git clone https://github.com/peer-calls/peer-calls.git cd peer-calls npm install

    Result of 'npm install': npm ERR! code 1 npm ERR! git dep preparation failed npm ERR! command /usr/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/preetam/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit npm ERR! npm WARN using --force Recommended protections disabled. npm ERR! npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm ERR! npm WARN deprecated [email protected]: this library is no longer supported npm ERR! npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm ERR! npm WARN deprecated [email protected]: Jetpack extensions are no longer supported by Firefox. Use web-ext instead to build a WebExtension. npm ERR! npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm ERR! npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm ERR! npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm ERR! npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! npm WARN deprecated [email protected]: Version no longer supported. Upgrade to @latest npm ERR! npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm ERR! npm ERR! code 1 npm ERR! npm ERR! path /home/preetam/.npm/_cacache/tmp/git-clone-9876d33a/node_modules/wrtc npm ERR! npm ERR! command failed npm ERR! npm ERR! command sh -c node scripts/download-prebuilt.js npm ERR! npm ERR! /bin/sh: 1: node-pre-gyp: not found npm ERR! npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! npm ERR! /home/preetam/.npm/_logs/2021-04-06T13_43_50_989Z-debug.log

    npm ERR! A complete log of this run can be found in: npm ERR! /home/preetam/.npm/_logs/2021-04-06T13_43_52_882Z-debug.log

  • android front camera not working.

    android front camera not working.

    Hello there,

    When I log in from the mobile android phone, there is no problem in the rear camera in the selection of the front and rear cameras, but I get an error when I select the front camera

    Error: (NotReadableError: Could not start video source)

    ** Smartphone (please complete the following information): **

    • Device: Android Vestel
    • OS: 7.0
    • Browser: chrome
    • Version: 83

    ** Additional context **

    WhatsApp Image 2020-06-11 at 11 06 13 WhatsApp Image 2020-06-11 at 11 06 14

  • Socket issue on server

    Socket issue on server

    Socket connection error A clear and concise description of what the bug is. WebSocket connection to 'wss://demovideo.my-domain.com/ws/123/za80HWiFPN4H4LGAHyIAc7' failed: Error during WebSocket handshake: Unexpected response code: 426

  • WebRTC and buffer

    WebRTC and buffer

    Hello, Jerko! I have a question for you. We used webchat for an hour in 9 ppl and I thought that after some time browser take more and more RAM. After 1 hour it was nearly 1gb and user clients start to lag. Is it a data buffer? And if yes - how can I clear it from time to time.

  • UX: Single click Mute / Disable Cemera

    UX: Single click Mute / Disable Cemera

    I think a simple UX improvement can be made to the Microphone and Camera buttons in-call. If we change these to "single-click" type buttons that enable/disable the microphone/camera respectively with a little "arrow" drawer to expand to the source selection this will be a big improvement.

    This is the most common feedback I get from other folks I jump on calls with using Peer Calls 😅

  • Reducing or eliminating audio echo?

    Reducing or eliminating audio echo?

    Would it be possible to either reduce or eliminate audio echo at all programatically in the audio streams?

    Playing around with other video/audio conf systems like Jitsi (mostly) they seem to do something here (although not looked into the details).

  • Implement a heartbeat mechanism to keep idle connections alive

    Implement a heartbeat mechanism to keep idle connections alive

    Describe the bug

    For Kubernetes clusters hosted on Google Kubernetes Engine, hereby referred to as GKE, the backend service timeout is 30 seconds by default. As a result, any WebSocket connection that idles will be automatically closed after 30 seconds, forcing a reconnect. There are two ways to resolve this:

    1. As a workaround, increase the backend service timeout.
    2. Implement an application-level heartbeat mechanism. The front-end is already sending a ping periodically, so a PR to address this could just update the server accordingly. But it's probably better for the server to send the ping so that it can clean up stale connections when clients fail to send a pong back after a certain amount of pings and/or time.

    This is encountered commonly enough for WebSocket apps deployed to Kubernetes clusters that IBM has documented the issue here. I can confirm myself that I ran into this issue for an unrelated project using a WebSocket server deployed to AWS' managed Kubernetes service and that a heartbeat mechanism will fix this issue for sure. Happy to open a PR if you're willing to accept it.

    See the following output for an example of what's happening:

    │ 2022-04-20T04:53:54.976301Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:53:54.977463Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:53:55.020683Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:54:24.979744Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:54:24.979798Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T04:54:59.116038Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:54:59.118349Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:54:59.165173Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:55:29.120557Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:55:29.120597Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T04:55:31.192008Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:55:31.193457Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:55:31.236369Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:56:01.196246Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:56:01.196298Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T04:56:35.329223Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:56:35.331623Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:56:35.387500Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:57:05.331969Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:57:05.332018Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T04:57:07.395933Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:57:07.397254Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:57:07.448145Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:57:37.398760Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:57:37.398831Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T04:58:11.534466Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:58:11.536506Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:58:11.589494Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:58:41.537675Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:58:41.537715Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T04:58:43.600252Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:58:43.601801Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:58:43.643807Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:59:13.602861Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:59:13.602899Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T04:59:15.675848Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T04:59:15.677216Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T04:59:15.728389Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T04:59:45.679293Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T04:59:45.679330Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T05:00:19.832378Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T05:00:19.834768Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T05:00:19.886100Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T05:00:49.835859Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T05:00:49.835904Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T05:03:00.212018Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T05:03:00.214576Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T05:03:00.256336Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T05:03:30.214772Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T05:03:30.214846Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T05:03:32.278332Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T05:03:32.279668Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T05:03:32.332569Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T05:04:02.282700Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T05:04:02.282745Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST                                                                                                                                                                                                                       │
    │ 2022-04-20T05:04:04.350007Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Enter room_id=FAST                                                                                                                                                                                                                      │
    │ 2022-04-20T05:04:04.351252Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] New websocket connection room_id=FAST                                                                                                                                                                                                   │
    │ 2022-04-20T05:04:04.396989Z  info [bsocket_handler:mesh] [RFWmhiHJ0teOp8uuEkUTv7] Got clients: map[RFWmhiHJ0teOp8uuEkUTv7:Daniel Vu] room_id=FAST                                                                                                                                                                         │
    │ 2022-04-20T05:04:34.353063Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Remove room_id=FAST                                                                                                                                                                                                                     │
    │ 2022-04-20T05:04:34.353103Z  info [        main:mux:wss] [RFWmhiHJ0teOp8uuEkUTv7] Exit room_id=FAST  
    

    Bug Report Checklist

    n/a

    Steps To Reproduce

    Deploy a Kubernetes cluster to GKE using the example manifests in this repo. After doing so, join a room as the sole participant and leave the browser tab open for a few minutes.

    Expected behavior

    For a WebSocket connection to a GKE-hosted peer-calls pod, said connection should not be closed automatically after 30 seconds if idle.

    Screenshots

    image

    Additional context

    Helpful links explaining the need for a heartbeat mechanism:

    • https://stackoverflow.com/a/46112000
    • https://stackoverflow.com/a/35826016
    • https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#pings_and_pongs_the_heartbeat_of_websockets
  • Question: peer-calls play usage?

    Question: peer-calls play usage?

    Hi,

    Just noticed that peer-calls has a play sub-command:

    $ dki -t --rm peercalls/peercalls play --help
    Usage: play [OPTIONS]
    Play RTP streams
    
    Options:
          --audio-fmtp string        audio media format parameters
          --audio-mime-type string   audio mime type (default "audio/opus")
          --audio-ssrc uint32        audio SSRC (default 2)
      -a, --audio-stream string      audio stream to read RTP from
      -c, --config string            configuration to use
      -k, --insecure                 do not validate TLS certificates
      -n, --nickname string          nickname (default "player")
      -r, --room-url string          room URL (default "http://localhost:3000/call/playroom")
          --video-fmtp string        video media format parameters
          --video-mime-type string   video mime type (default "video/vp8")
          --video-ssrc uint32        video SSRC (default 1)
      -v, --video-stream string      video stream to read RTP from
    

    However I'm not actually sure how to use this, what it's for etc... Are there an examples of how to use this? Use-cases?

    Moreover what other interesting things can I do with WebRTC and Peer-Calls? (Note: I do believe I have my instance setup properly with a coturn server now finally 🥳)

  • Integrated TURN/STUN server using pion/turn

    Integrated TURN/STUN server using pion/turn

    Have we considered building an integrated TURN/STUN server into PeerCalls itself using the pion/turn library? If not, why not? If so, would anyone be willing to help me add support for this?

DeepValueNetwork is a peer-to-peer database network managed and hosted by its community.

DeepValueNetwork To understand what DeepValueNetwork will be, I suggest you read this document. In progress This software is currently being developed

Dec 10, 2022
Zero Trust Network Communication Sentinel provides peer-to-peer, multi-protocol, automatic networking, cross-CDN and other features for network communication.
Zero Trust Network Communication Sentinel provides peer-to-peer, multi-protocol, automatic networking, cross-CDN and other features for network communication.

Thank you for your interest in ZASentinel ZASentinel helps organizations improve information security by providing a better and simpler way to protect

Nov 1, 2022
An imageboard, but images are stored in a peer-to-peer network
An imageboard, but images are stored in a peer-to-peer network

Interplanetary File Dumpster An imageboard, but images are stored in a peer-to-peer network Features: Easy file sharing without registration and SMS.

Sep 30, 2022
📦 Command line peer-to-peer data transfer tool based on libp2p.

pcp - Peer Copy Command line peer-to-peer data transfer tool based on libp2p. Table of Contents Motivation Project Status How does it work? Usage Inst

Jan 5, 2023
gopunch is a go implementation of a peer-to-peer chat service built using UDP hole punching.

Gopunch gopunch is a go implementation of a peer-to-peer chat service built using UDP hole punching. This is a toy implementation that I put together

May 24, 2022
Peer-to-peer hypermedia protocol
Peer-to-peer hypermedia protocol

IPFS powers the Distributed Web A peer-to-peer hypermedia protocol to make the web faster, safer, and more open. TL;DR Get help and talk about ideas i

Jan 5, 2023
Steve - A peer-to-peer (p2p) decentralized network

Steve Steve is a peer-to-peer (p2p) decentralized network that enables people to

Feb 5, 2022
Aidos Kuneen (v2 network) daemon program that is controlled through the command line and remotely via RPC calls

adk-daemon: aidosd.v2 aidosd (v2) is a deamon which acts as bitcoind for adk. This version has been built specifically for network mesh version 2+ For

Dec 1, 2021
Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service.

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service. Program can take large input files.

Feb 6, 2022
Receive phone calls from anybody on the Web. Or host a telephony server yourself.
Receive phone calls from anybody on the Web. Or host a telephony server yourself.

WebCall WebRTC Telephony Server Browser based telephony over E2E-encrypted P2P-links with very high audio quality. WebCall is lightweight and easy to

Jan 5, 2023
simplified helper to create http client calls to test your server

Overview Simplified creating http client calls for testing http servers or handlers. Cleanly build and execute http requests in tests so that you can

Nov 1, 2021
A simple FTP protocol with client and server implemented in TypeScript and Golang

websocket-ftp A simple FTP protocol with client and server implemented in TypeScript and Golang. Example (Client) const buffer: Uint8Array = (new Text

Apr 14, 2022
gRPC Web implementation for Golang and TypeScript

gRPC-Web: Typed Frontend Development gRPC is a modern, HTTP2-based protocol, that provides RPC semantics using the strongly-typed binary data format o

Dec 29, 2022
Creates a linux group of users synced to your Google Workspace users and automatically imports their public SSH keys.
Creates a linux group of users synced to your Google Workspace users and automatically imports their public SSH keys.

Creates a linux group of users synced to your Google Workspace users and automatically imports their public SSH keys.

Jan 27, 2022
Example of strongly typed go/graphql/typescript web application

go-gql-typescript-example Example of strongly typed go/graphql/typescript web application Overview This is an example web application. On the server i

May 27, 2022
The high-performance build system for JavaScript & TypeScript codebases
The high-performance build system for JavaScript & TypeScript codebases

Documentation Visit https://turborepo.org to view the full documentation. Community To chat with other community members, you can join the Turborepo D

Jan 4, 2023
Transform Golang `enum` type to Typescript enum

golang-enum-to-ts Transform Golang enum type to Typescript enum Function Before (Golang) package some type Status int const ( Todo Status = iota D

Mar 1, 2022
Generate Typescript types from Golang source code

?? tygo Tygo is a tool for generating Typescript typings from Golang source files that just works. Other than reflection-based methods it preserves co

Dec 16, 2022
Automatic AWS Security Group ingress through DDNS

Auto DDNS Security Lambda Update AWS Security Group rules to an IP resolved from a DNS hostname. Useful to dynamically allow ingress from a DDNS hostn

Oct 19, 2021