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

Live streaming to a client #7

Closed
naveennamani opened this issue Dec 16, 2017 · 1 comment
Closed

Live streaming to a client #7

naveennamani opened this issue Dec 16, 2017 · 1 comment

Comments

@naveennamani
Copy link

naveennamani commented Dec 16, 2017

Is it possible to provide a live streaming to the user through this?
I've tried the following code

var Mic = require('node-microphone');
var mic = new Mic();

app.get('/testmic',function(req,res) {
	var micStream = mic.startRecording();
	micStream.pipe(res);
});

when I directly pointed to this address (localhost:4000/testmic) the stream is getting downloaded as some file.
But I want it such that when I assign this url to a audio src attribute in HTML5 audio element, I should be able to listen to the stream.

Is it possible? If yes, where have I done the mistake?

@Flowr-es
Copy link
Owner

Flowr-es commented Mar 4, 2018

Hi @naveennamani, sorry I was pretty inactive.
Yes this is possible, but your browser interprets the stream as a download. You will need some Client (HTML/Javascript) Parts to realize that. However this would be out of scope for this module, so I will close this issue.

@Flowr-es Flowr-es closed this as completed Mar 4, 2018
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

2 participants