node-rtsp-stream-es6 icon indicating copy to clipboard operation
node-rtsp-stream-es6 copied to clipboard

camdata event code should be changed

Open hoon720823 opened this issue 4 years ago • 2 comments

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) } } })

hoon720823 avatar Jun 09 '20 10:06 hoon720823

Hi,

Sorry for the delay.

A pull request is welcome.

Wifsimster avatar Aug 10 '20 14:08 Wifsimster

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. )

langorn avatar Dec 15 '20 15:12 langorn