Reputation: 8347
I was just looking for suggestions on how I can embed our RTSP stream directly into a web browser?
I have a solution that works by implementing a proxy RTSP server using WebRtc but I want to offload this processing on the browser side. Any JS library or technique which I can use to achieve this?
The major problem I am facing with the current implementation is I am facing a processing power issue as I am trying to play more than 20 RTSP streams at the same time and I want to over come this device/hardware limitation by moving it to the client side.
Upvotes: 2
Views: 2292
Reputation: 11
I used in my project streamedian player. As the web browser is not able to open tcp connections directly to the camera this player uses
web socket channel and intermediate server. But this server is not transcode streams and only proxy stream from the camera to the websocket.
Streams are decoded on the user side directly in the player on web browser without additional plugins.
example of player using
let formatHandler = function (format) {
if (html5Player && html5Canvas) {
if (format === 'h265') {
html5Player.setAttribute('hidden', true);
html5Canvas.removeAttribute('hidden');
} else if (format === 'h264') {
html5Player.removeAttribute('hidden');
html5Canvas.setAttribute('hidden', true);
}
}
}
var playerOptions = {
socket: "wss://streamedian.com/ws/h265/",
redirectNativeMediaErrors : true,
bufferDuration: 30,
errorHandler: errHandler,
infoHandler: infHandler,
videoFormatHandler: formatHandler,
continuousFileLength: 180000,
eventFileLength: 10000,
canvas: 'video_canvas',
};
Upvotes: 1