Giter Site home page Giter Site logo

webrtc_demo's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.