Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda