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

(solved) video client don't start (0 FPS but data is received) #8

Open
VigibotDev opened this issue May 15, 2018 · 0 comments
Open

Comments

@VigibotDev
Copy link

This bug appear when a server side video is re-started without any client.
You write the header only if there is wsServer.clients.length > 0.

I just moved the "if (headers.length < 3) headers.push(data)"
outside the "if (wsServer && wsServer.clients.length > 0) {"

(root|/var/www) git diff
diff --git a/visio/serveur.js b/visio/serveur.js
index 1016c87..2fb3cb9 100644
--- a/visio/serveur.js
+++ b/visio/serveur.js
@@ -50,8 +50,8 @@ if (conf.get('tcpport')) {
     headers = []
     const NALSplitter = new Split(NALSeparator)
     NALSplitter.on('data', (data) => {
+      if (headers.length < 3) headers.push(data)
       if (wsServer && wsServer.clients.length > 0) {
-        if (headers.length < 3) headers.push(data)
         broadcast(data)
       }
     }).on('error', (e) => {

I forked your repo I can do commits + pull request if you want.

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

1 participant