rtsp-relay icon indicating copy to clipboard operation
rtsp-relay copied to clipboard

How can I change or add stream url at client?

Open MinHyeong-Lee opened this issue 4 years ago • 3 comments

Thanks for your code ! It works well. notitle

I want to add or modify rtsp url at the client.

At your code, when creating a proxy object at server, 'url' is included together. There is any way can i switch this url??

Or is there a way to dynamically add rtsp stream at the client?

Thanks for read. I really want to do this..

MinHyeong-Lee avatar Jan 29 '21 07:01 MinHyeong-Lee

hi @MMIINNHH, yes that's possible. Here's an example:

app.ws('/api/stream', (ws, req) => proxy({
  url: req.query.url,
})(ws));

then in your frontend, you would use a URL of ws://localhost:1233/api/stream?url=rtsp://...

k-yle avatar Jan 30 '21 00:01 k-yle

i need also help with that, at server i have this:

const handler = proxy({ url: rtsp://.....@..../Streaming/Channels/101, verbose: false, transport: 'tcp', });

app.ws('/api/stream', handler);

i'm using Reactjs, and from there i want to add rtsp url and not in server like u have done my client: <FormControl> <TextField required={true} type="text" id="source" value={source} onChange={handleChange} label={ <Trans i18nKey="...">URL</Trans> } ></TextField> </FormControl>

, how should i change these and send url from client ?

waleedd32 avatar May 11 '22 12:05 waleedd32

@waleedd32 does https://github.com/k-yle/rtsp-relay/issues/12#issuecomment-770121775 not answer your question?

k-yle avatar May 12 '22 00:05 k-yle