Skip to content

How to display two RTSP streams within one page? #53

Answered by k-yle
Joc007 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Joc007, that way is perfectly fine if you only have a few cameras

If you have many cameras you can avoid writing const handler = proxy({ and app.ws('/api/stream', handler); many times by doing this:

// the one dynamic endpoint used for all RTSP streams
app.ws('/api/stream/:id', (ws, req) => proxy({
  url: `rtsp://us:[email protected].${req.params.id}:554/cam/realmonitor?channel=1&subtype=0``,
})(ws));

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by k-yle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants