Skip to content

MarcTestier/WebRTC_demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

WebRTC Demo

Pre-requisite

You can download and install Node.js from this link or via your preffered package manager.

This code has been extracted from the google codelabs tutorial which can be found here

The code for recording has been taking from the webrtc samples here

Running the Demo

To install dependencies (such as /socket.io/socket.io.js), run the following from the command line terminal, in your work directory:

npm install

From the command line terminal, run the following command in the work directory:

node index.js

From your browser, open localhost:8080.

Open localhost:8080 again, in a new tab or window. For a different PC on the same network, open the <SERVER_IP>:8080, where SERVER_IP is the IP of the PC running the Node.js server. One video element will display the local stream from getUserMedia()and the other will show the 'remote' video streamed via RTCPeerconnection.

You will see a prompt asking for user type(either Nurse or Patient), the code requires this information because the Call Button is supposed to be enabled on the Nurse page only. This is a temporary hotfix solution, a better method would be to have a kind of a login page initially which could differentiate between users and subsequently provide the appropriate page for Nurse and a different page for patients.

Recording

The Start recording button will only be enabled once the browser recieves a remote Stream i.e. when both the parties have joined the room. To Start, stop, play and Download recording, buttons are availaible on the simple HTML page.

Note : You'll need to restart your Node.js server each time you close a client tab or window.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.8%
  • Other 1.2%