Back in 2016, I’ve worked on an application called ShareTC that allowed users to share their files through their web browser using the WebRTC technology.
Back in 2016, I’ve worked on an application called ShareTC that allowed users to share their files through their web browser *using the WebRTC technology. The application was working well but the promise was to be able to *share files without any server. The first version used PeerJS, a library allowing you to implement WebRTC data channel for file sharing easily with a drawback, it needs a server for what is called the signaling process. Thus, I’ve made some improvement to the project to allow user to share their files without even using a signaling server.
For those who are not interested by the technical implementation you can directly have a look to the demo on GitHub.
Because this is a side project, I didn’t want to recreate a component library so I used the @angular/material library for the forms and user feedbacks.
I also used @angular/flex-layout to easily define the layout, knowing that the application design is really basic as it is not the primary intent of the demonstration.
So, the interesting part now, the application will try to create a data channel between the sender and the receiver, using WebRTC. The protocol needs to know to whom it should send the data, this is named peer discovery, and it can be done automatically through what is called a signaling server, a server where you exchange your configuration to begin the communication and this is the component that I wanted to remove. For the manual configuration we use the Session Description Protocol (or SDP).
Session Description Protocol
But because the networks are complex, in some cases, you’ll need a Session Traversal Utilities for NAT (or STUN) server. This is used when you’re exchanging a file from behind a Network Address Translation (or NAT) firewall. There are some public servers available for this like:
Session Traversal Utilities for NAT
In some other cases the communication channel will be blocked by firewalls. In this case you can eventually use a Traversal Using Relays around NAT (or TURN) *server *that will work as a Data relay between you and the peer. They are expensive and only necessary if you’re behind a blocking firewall so I didn’t integrate a solution for that 😊
Traversal Using Relays around NAT
Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.
What is Angular? What it does? How we implement it in a project? So, here are some basics of angular to let you learn more about angular. Angular is a Typesc
Sass in Angular is an extension of CSS that allows you to use things like variables, nested rules, inline imports. Angular supports Sass, CSS, and Less.
Angular 11 login with facebook. In this tutorial, you will learn how to login with facebook in angular 8/9/10/11 app.
Angular 11 google login example. In this tutorial, you will learn how to integrate google social login in angular 11 app.