Streaming/playing the video from the user's filesystem - javascript

The user has a video file on his system. Now, on the webpage there is an option to select a video file from his computer itself. I am seeking a way to directly stream the video on a html5 video tag(or any other player for that matter) from his/her computer on the fly. Please help.

This is a bad question and I do not see any effort from your part. Please check how to pose a question: https://stackoverflow.com/help/how-to-ask
Assuming you only need to support Web Browsers that support HTML5 then try
WebRTC (http://www.webrtc.org/home)
WebRTC is a free, open project that enables web browsers with
Real-Time Communications (RTC) capabilities via simple JavaScript
APIs. The WebRTC components have been optimized to best serve this
purpose.
It is important to note that this is just my personal preference.
Edit:
If you want to steam a file then take a look at VideoLAN (or VideoLAN Server). http://www.videolan.org/index.html

Related

Javascript alternative to JavaSonics ListenUp

I'm working on a server that has been using JavaSonics ListenUp (written in Java) to record audio via browser at clients and upload it to the server.
The problem is: the software was discontinued, no longer updated or supported, and, because it's Java, it doesn't run on every web browser, as Google Chrome/Chromium and Microsoft Edge, for example, don't support NPAPI plugins (like Java) anymore.
I wanted to know what can I use for the same job (record audio, upload audio files, play audio) to put it on the website I'm working on. Alternatives on Javascript would be awesome!
PS. There's a topic here where people talk about flash tools, but I'd rather not use them. Plus, I guess people who used that JavaSonics software might want an alternative also.
Check out recorder.js.
https://github.com/mattdiamond/Recorderjs
It's a javascript library that lets users record audio. After recording, you can export the audio to a WAV file, or upload the BLOB to your server, or whatever.
you could use HTML5: getUSerMedia()

How to play MP3 files into the microphone input jQuery

I am attempting to create it so when a user plays a sound, it plays the sound to the users microphone input. Thus when they're in a Skype Call/Game chat/etc it will be played for all users to hear.
Is there any way to play music to the microphone instead of speakers in Javascript/jQuery? If not, does node-webkit give me any more ability to do this?
Hopefully this is well explained, it is a little challenge.
Thanks for any, and all advise!
This is not possible from the web browser alone. Most systems aren't even capable of this directly.
It is up to the client to decide how to route audio and there is no control of this within the browser, except for what happens within the page itself.
The best you can do is to recommend to your users how to configure their systems. For your Windows users, they will need a virtual audio loopback driver. http://vb-audio.pagesperso-orange.fr/Cable/

What Protocol to use for chat? webRTC or Websockets

I'm creating a Chat site that will be able to do, Video, Audio and Text Chatting. I'm currently using Websockets for Text Chatting. I need to know what is best at Video, Audio and Text Chatting. Which one is more effiecint. Should I use Websockets for all of them or webRTC for Video and Audio and Websockets for Text Chat. I can do both and wouldn't like to have to re-write my text chat for webRTC but if it is a better option then I will.
EDIT: I've just found out about binaryJS, Is this a better and easier alternative to webRTC?
Thanks,
#_C1D
By embedding your video and audio streams in websockets, you'll have a simpler system but everything will have to pass through your server.
WebRTC allows for a direct connection between pairs, so you'd get much better results using it.
Note also, but you probably know it already, that everything webRTC is just emerging.
Regarding the question in edit, about binaryJS : I never tried that but it doesn't look like a deal changer, just a facility for using websockets.

Are there any programs to record through a microphone that work inside a web browser?

I had a someone ask me if it were possible to record a person's voice inside of a web-browser - similar to what can be done on many operating systems. Is this possible through javascript or flash? Are there any programs that let you do this, and have the wav/mp3 of the recorded audio uploaded to the server? I'd prefer the solution to not use Flash if it can be avoided.
Thanks
You could use WAMI-Recorder. It still uses flash, but is designed to work with Javascript and data can be sent with HTTP POST. However, there's no way to access the microphone with Javascript alone.
At the moment, Chrome is the only browser that supports x-webkit-speech which is what they use to allow users to use voice to search Google on their desktop. HTML5 has getUserMedia, but support for that is also minimal and if your project is for mass consumption then it's unlikely to be a suitable.
Hey check out this post where i replied to a guy with a similar question as you.
How do I embed a Flash audio recorder in my site
I have done extensive research into client side only microphone recording and could not come up with any solution other than flash. If you follow my correct answer in the thread i posted, you can record audio from a microphone on the client side and then you can modify the code yourself and upload the audio to your server, its not that hard just a simple POST call.
If you do find a non-flash way to record let us know!

Can I use microphone and sound with javascript?

I would like to develop a very small application using javascript... this application should pass the voice recorded from a microphone to the sound.
Is it possible?
I know that i can access to microphone using Flash, but i would like to use javascript if possible.
Thank you!
Keep an eye on HTML5's implementation of getUserMedia. For a work-around using flash see:
https://code.google.com/p/wami-recorder/
That example actually passes audio to a server via an HTTP post (so no need for a Flash Media Server), but you could easily adapt it to keep the audio on the client side.
In this question about video streaming via web sockets it is possible to stream video. Theoretically it might be possible to write a client side application that creates a local TCP socket for microphone and audio, to which the browser and Javascript then listen.
I don't know if this has ever been attempted, and it would require significant code outside the browser to make happen.
You don't gain much either by doing it this way, over say, Flash since you still have client-side dependencies.
Nope. This is not possible. Javascript is not meant to access devices. you will need some abstraction technology like flash or silverlight that can help you with this otherwise javascript engine runs under the browser and it has no strings attached to the client-machine on which the browser is running.

Categories