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

camdata event code should be changed #14

Open
hoon720823 opened this issue Jun 9, 2020 · 2 comments
Open

camdata event code should be changed #14

hoon720823 opened this issue Jun 9, 2020 · 2 comments

Comments

@hoon720823
Copy link

this.on('camdata', (data) => { for (let i in this.server.clients) { let client = this.server.clients[i] if(client.readyState === WebSocket.OPEN) { client.send(data) } } })
javascript Set iteration
this.on('camdata', (data) => { for (let client of this.server.clients) { if(client.readyState === WebSocket.OPEN) { client.send(data) } } })

@Wifsimster
Copy link
Owner

Hi,

Sorry for the delay.

A pull request is welcome.

@langorn
Copy link

langorn commented Dec 15, 2020

after change to the hoon720823's suggestion , everything works.
thanks hoon.

https://imgur.com/WBYDwx5
the proof of how it looks like.

Wifsimster,
i really appreciate for what you did, i am actually looking for a rtsp to webrtc live-streaming solution .
your es6 version is extremely easy to understand the flow......let me have some hope to get it done.

if you add hoon's suggestion , things will works perfectly.....

( maybe user might need create a views for themself, but the things is working. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants