rtsp-relay
rtsp-relay copied to clipboard
Needs of express websocket
trafficstars
Hello !
Do you realy need express websocket ?
**
* @param {Application} app the express application
* @param {import("http").Server | import("https").Server} [server] optional - if you use HTTPS you will need to pass in the server
*/
module.exports = (app, server) => {
if (!wsInstance) wsInstance = ews(app, server);
const wsServer = wsInstance.getWss();
/**
* This map stores all the streams in existance, keyed by the URL.
* This means we only ever create one InboundStream per URL.
* @type {{ [url: string]: InboundStreamWrapper }}
*/
This is how I use your lib:
this.rstp = rstp()
this.rstpProxy = this.rstp.proxy({
url: `rtsp://test:[email protected]/axis-media/media.amp`,
verbose: false,
})
I comment
//if (!wsInstance) wsInstance = ews(app, server);
//const wsServer = wsInstance.getWss();
and i'm using basic websocket , seems to work
Good point, as of #74 we don't actually need an explicit dependency on express-ws