Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
Rebuilding ipcam video viewer in the browser

I have an off-brand ip-camera that displays a live feed of the video in a <canvas> element in its web ui. I would like to rebuild this ui.

I believe the camera serves the video feed through a websocket connection since rtsp:// in not browser compatible. The feed url is: ws://192.168.0.20:80/websocket.

I put together a basic browser script that connects to the websocket and listens for messages. It connects fine, but no messages begin streaming. The script looks like this:

const WS_URL = 'ws://192.168.0.20:80/websocket';

function setupWebSocket() {
    const ws = new WebSocket(WS_URL);

    ws.onopen = function() { console.log('connected'); }
    ws.onmessage = function(e) { console.log(e.data); }

    return ws;
}

const ws = setupWebSocket();

This code successfully prints "connected" but no messages start arriving in onmessage. If I do a ws.send('some-data') a message will happily come, but again no video data is being automatically streamed from the camera as I thought it would.

Is it correct to expect video data to automatically begin streaming once connected? If not how would I trigger it to start? Am I going about this correctly? I would appreciate any advice no matter how general. As you can probably tell I am not overly seasoned with sockets or video.

Thanks!

UPDATE: The camera model is ONWOTE PoE Security Camera UltraHD 4K 8MP with Audio, 2.8mm Lens Wide View Angle, Indoor/Outdoor, 100ft IR, Add on Turret IP Camera to ONWOTE 4K Security System

The network panel shows a websocket connection managed by libde265.js which is a library to decode h265 data.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!