TOP 3 WAYS TO GET AFFILIATE COMMISSIONS FAST

The ideal world of affiliate marketing does not require having your won website, dealing with customers, refunds, product development and maintenance. This is one of the easiest ways of launching…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




RTCP stream in HTML throught WebSocket

In this article we will create an application that will output the RTCP stream to an HTML page

Architecture overview

So we need to implement a server on Node.js which will, at the request of the client, start the transformation of the stream and response with a link as a result

Create a folder where the server will be stored and install the dependencies

Let’s write code in which we will create an express application with the /start route, which when called will create a new instance of the streaming server with a given link to the stream

Run the server

Create a simple index.html file where we’ll add a container for embedding the video stream. The entry field for the link to the RTCP stream and the button to start playing a new stream, as well as don’t forget to connect jsmpeg to play the video and index.js, which will contain all the logic

When the Play button pressed, send a request with the streamUrl parameter to /start route of our server, upon receiving a reply we create a player that plays the video with the link given by the server response

As you can see the streaming video appears with a pretty long delay, about 12 seconds. This may be enough, but if you want to reduce the delay of the stream and get closer to real time read the next article in which we will try to reduce that delay

Add a comment

Related posts:

Your Comprehensive Guide to Overlapping Duties

When duties overlap in the world of construction, things have the potential to get a little complicated. But this can be managed simply — you just need to be organised, proactive and ready to…

Starting out in Product Management

Product Managers have been around for years but start-ups have led the way in modernising Product Management methods so they’re now considered an integral part of any business that offers a digital…

The Importance of Community in Learning Coding

When I first attempted to learn coding, I thought “self-taught” meant you’re by yourself. Besides, that’s what I mostly did with the rest of the things in my life anyway. I’m not lonely, I just love…