Jasmine cam live 2014

by  |  26-Dec-2019 12:28

A few days ago Bala Kolluru has reached out to me asking if we can control a Raspberry Pi camera module using Web browser, so he can view a live stream from any HTML5 powered device.I was intrigued by this idea and wanted to give it a try.

Jasmine cam live 2014-79

This is really not the best of solutions, but it kind of gets the job done.

I am looking for other alternatives too and will update this post as it goes.

Server(app); var io = require('socket.io')(http); var fs = require('fs'); var path = require('path'); var spawn = require('child_process').spawn; var proc; app.use('/', express.static(path.join(__dirname, 'stream'))); app.get('/', function(req, res) ); var sockets = ; io.on('connection', function(socket) ); http.listen(3000, function() ); function stop Streaming() function start Streaming(io) Line 18 : Global sockets object.

This will store all the connected sockets Line 22 : When a client connects to the server, a new socket will be created. Line 25 : We delete the disconnected client from the global object and if there are no more clients we will stop the streaming (power saving) Line 36 : We start the streaming on start-stream event.

Live broadcasting Sunny Beach webcam, overlooking the beach and the sea in Sunny Beach resort in Bulgaria.

Community Discussion