131 / h264-live-player

A live h264 player for the browser (ideal for raspberrypi / raspicam )
MIT License
1.08k stars 251 forks source link

Auto-play with no button callbacks #91

Closed avidsapp closed 3 years ago

avidsapp commented 3 years ago

For my use case, it's ideal that the stream start in conjunction with node and without button callbacks. Removing the buttons is simple enough, but directly calling wsac.playStream() returns the error Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.

avidsapp commented 3 years ago

Resolved by moving self.start_feed(); function outside of the scope of socket.on("message"... function, but still inside of new_client(socket) function in _server.js. Comment out buttons on index.html