sçuçu
sçuçu

Reputation: 3070

P2P file sharing with WebRTC API in browser and Electron Platform

Is it possible to have bittorrent-like, central-server-less and from-and-to multi peers (other several users that send or receive file parts from you) P2P file transfers in a modern web browser via WebRTC API, especially in Chromium, with not only regards to Electron Atom apps, that packages with that web browser?

Can a PopcornTime app be built with this api in Electron Platform and in any of the modern web browsers?

Upvotes: 0

Views: 2237

Answers (2)

Yan Foto
Yan Foto

Reputation: 11378

tl;dr

unless communicating peers are on the same local network, there is not way to establish a connection without a rendezvous server (e.g. STUN) or a relay server (e.g. TURN).


Explanation

It is misunderstanding that WebRTC enables P2P communication without any servers in between. In most of the cases where peers are not in the same network (i.e. same local network) and are behind NAT devices, it is required to use either STUN or TURN servers (see the specs).

Moreover when we talk about multiple peers, we don't talk about multicast or broadcast communication, rather about a multiple number of peer to peer connections.

Upvotes: 1

Philipp Hancke
Philipp Hancke

Reputation: 17295

have you seen https://webtorrent.io/ and all the related presentations?

It's not completly serverless though.

Upvotes: 1

Related Questions