for my upcoming project i would like to know if there is solution to access the webcam without good old flash. Is it possible to do that in javascript, jquery or any other framework.
Maybe you've an approach for a workaround or something!
any help is much appreciated, thanks!
It's possible in HTML5 with the getUserMedia() API, but as yet browser support is very limited.
See http://www.html5rocks.com/en/tutorials/getusermedia/intro/ for more info.
Note that the user MUST explicitly permit access to the camera and microphone, to prevent illicit snooping.
Related
Since I read Google's message that NPAPI will no longer be supported by the end of 2014, I've been looking for an alternative. The issue is that we currently use a custom made Kinect Browserplugin which we use to control the browser with JS and control Unity Web Player games with your body.
Without NPAPI support it simply won't work anymore and our work will be lost. Google gives NaCl as an alternative but this doesn't support interaction with hardware.
The main question I have is: How to use the Kinect in a webbased platform and crossbrowser?
Currently we have the "normal" Kinect and the Kinect One from the closed beta working in the browser and Unity Web Player.
Please share your thoughts on a solution.
I apologize in advance for just spewing out links without actually supplying much information, but as far as I know there are no known good alternatives.
If I was in your position, I would have a look at the chrome.usb API or possibly, depending on your use case, node-kinect.
Here's a good general resource/discussion of NPAPI alternatives: Browser Plugins in a post NPAPI world
Probably your best approach at this point is to continue using NPAPI except in Chrome, and in Chrome use native messaging. Of course, Chrome has made it as difficult as they can to install the host that you'll be connecting to, so it'll be a pain and you'll have to install the extension and the host seperately, but there you go.
I'm creating a web-app which needs an audio recording from the user's computer, How do I accomplish this using JavaScript? I've heard about the getusermedia utilities but that's not very stable and I'm looking for a better alternative. Can someone suggest me anything?
scriptcam offers a flash alternative instead of using getusermedia. It is very stable for now.https://www.scriptcam.com/
getusermedia is quite stable and simple. check out this jsfiddle i made much earlier:http://jsfiddle.net/XHzT6/(warning:might only work on chrome.) Hopefully, you might change your mind.
cheers!
I know, I know, this is a duplicate question of this and this. However, these questions are somewhat outdated, and I haven't found a suitable solution.
I would like an easy, cross-browser and cross-platform solution for playing sound in the browser using JavaScript. I use and love jQuery, and had a look at this pluggin. I've tested the demo but was disappointed. For example, I had to allow the application to play the file. I want it to just work without any plugin, authorisation, etc.
I know that the AngryBirds chrome extension plays sound in the browser seamlessly but I don't know how they do it. Any suggestions for seamless sound in the browser?
I like to use Sound Manager 2 for this. It depends on Flash. It looks like it hasn't been updated in a while though, so it might not be a good choice if it doesn't already work in all the browsers you care about. Support for the audio tag is getting pretty good.
Is is possible to detect when an online advertisement is playing audio? In an ideal world, I could do this through a browser in real-time and send a notification that would include the DOM information needed to remove the ad. In this type of model, I could theoretically then use all clients (web visitors) as test subjects. I believe that this might be far fetched, and thus will need to rely on a smaller subset of users. I'm looking for any way to do this. I have even thought about using speakers and a microphone to detect when a sound is playing, and then some how capture a screenshot and the DOM information. Please help. Thank you.
In a previous question, it was stated that this is not possible.
Edit:
No. The best you could do is maybe be able to detect that the browser is or is not playing sound. Even if you could do that, you would have difficulty detecting which tab or page was creating the sound. And if you could, you would have difficulty detecting the offending HTML. Could be flash, javascript, or HTML 5's tag. And even if you could do all of this, IE would surely (being the pain that it is) not support any of your attempts to complete this objective.
Bottom Line: You simply can't do what you are wanting to do. You would need to be able to query the browser for playing audio to be confident that you could handle all supported methods of playing sound in a browser. AFAIK, no browsers support this, so you are out of luck.
I just came across a Nintendo emulator written entirely in JavaScript on the interwebs, but it doesn't have sound. It got me thinking: Is there any way to synthesize sound in the browser using JavaScript and then play it? If it's not possible in general, then are there any Safari/Opera/FireFox/IE/Etc. extensions that would make it possible?
I am not asking about techniques for synthesizing sound, just techniques for playing sounds that have been synthesized by code running in the browser.
I would imagine your best bet is to have Javascript talk to Flash using ExternalInterface (http://www.adobe.com/devnet/flash/articles/external_interface.html). Flash now has a way of transfering data between the sound buffers and a general purpose ByteArray classs.
http://www.adobe.com/devnet/flash/articles/dynamic_sound_generation/
You can develop Flash for free using the Flex SDK http://www.adobe.com/products/flex/.
Most developers use SoundManager 2 when they want to add sound to their application with JavaScript. It has hooks so JavaScript can interact with Flash 8 and 9 features. I am not sure if it has exposed the ability to work with Byte Data which I guess you are after, I never had to deal with that.
It turns out the author of the NES emulator has found a dynamic audio library:
https://github.com/bfirsh/dynamicaudio.js
I haven't tried it, but the docs look promising:
var dynamicaudio = new DynamicAudio({'swf':
'/static/dynamicaudio.swf'})
write(samples); // Plays an array of floating point audio samples in the range -1.0 to
1.0.
In theory it should be possible to synthesize the sounds and then get the browser to play them using a data URL.
In practice, Steven Wittens has actually produced a demo of this technique. The encodeAudio8bit and encodeAudio16bit functions are where the magic happens.