This Flutter project allows two users to video call using webRTC, through the flutter_webrtc package.
WebRTC leverages a bunch of APIs which work together to allow real time, peer-to-peer communication between multiple users. These include APIs which get local video and audio streams from the device, APIs which set up peer-to-peer connection using ICE protocol which, in turn, uses STUN and its extension TURN protocols.
One more thing one needs to set up a webRTC connection is a signalling server which is used to exchange information and ICE candidates between users who want to connect. This is not provided through webRTC in order to provide developers the freedom to make their own signalling server using whatever method they like.
For this, I have used node.js to make a local websocket server to enable communication between users who are connected to the same LAN as the server. Here is the server code along with instructions to set up --> https://github.com/ayugupt/WebRTC_Signaling_Server.git
Make sure to put the local IP address of the computer running the server in line 50 of call.dart as the first parameter of the function signalling.connect(). To see what your local IP address is in ubuntu, type "hostname -I" in the terminal.
To connect with another user who is logged onto the signaling server, just enter their username when prompted and call.
NOTE- This flutter App has only been tested on Android, It may not work for Ios.