Skip to content

Client Always disconected and stream canot appear #276

@osenbal

Description

@osenbal

I run my code like documentations :

But stream can't appear and socket not send the data

image

My Code :

`const express = require('express');
const app = express();

const { proxy, scriptUrl } = require('rtsp-relay')(app);

const handler = proxy({
url: rtsp://admin:[email protected]:554/ISAPI/Streaming/tracks/101?starttime=20240806T090000Z&endtime=20240806T090100Z,
// if your RTSP stream need credentials, include them in the URL as above
verbose: true,
transport: 'tcp',
});

// the endpoint our RTSP uses
app.ws('/api/stream', handler);

app.get('/', (req, res) =>
res.send(`

<script src='${scriptUrl}'></script> <script> loadPlayer({ url: 'ws://' + location.host + '/api/stream', canvas: document.getElementById('canvas') }); </script>

) ); app.listen(2000);

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions