Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs of express websocket #217

Open
ptorrent opened this issue Jul 6, 2023 · 1 comment
Open

Needs of express websocket #217

ptorrent opened this issue Jul 6, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ptorrent
Copy link

ptorrent commented Jul 6, 2023

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

@k-yle
Copy link
Owner

k-yle commented Oct 31, 2023

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

@k-yle k-yle added enhancement New feature or request good first issue Good for newcomers labels Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants