Coder Social home page Coder Social logo

medtronictask's Introduction

Video/Audio Broadcasting Demo

this is a quick demo about using webrtc on nodejs server to allow Broadcasting video/audio by Broadcaster and allow clients to watch it in real time

Getting started

Starting the application

Start the application using Node:

# Install dependencies for server
npm install

# Run the server
node src/server.js

Testing the application

The application should now be running on your localhost:8080 and you test it by connecting to localhost:8080

you can click on Broadcaster in home page to act as Broadcaster

after that, then you can open new tab in same browser or any other browser to try to act as client using same url localhost:8080 but by clicking on client button which you should get the video that is streamed from the broadcaster.

explaining lifecycle of demo

  1. we run the server
  2. you visit as broadcasteer
  3. we create rtc peer connection and save id of broadcaster
  4. we find and set ice candidate
  5. after previewing the video we wait for any client to watch
  6. when client visit watching page we start our client cycle
  7. we connect client to server
  8. we notify server that new client is connect which notify broadcaster
  9. broadcaster will init offer and send it to watcher
  10. watcher get the offer and init answer and send it to broadcaster
  11. both broadcaster and client/watcher have sdp info which makes it ready for both to connect and preview real time connection

medtronictask's People

Contributors

moso14 avatar mosoahmed avatar

Watchers

James Cloos avatar  avatar

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.