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

Needs of express websocket

Open ptorrent opened this issue 2 years ago • 1 comments
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

ptorrent avatar Jul 06 '23 15:07 ptorrent

Good point, as of #74 we don't actually need an explicit dependency on express-ws

k-yle avatar Oct 31 '23 06:10 k-yle