Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

262
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda