We need to capture voice in a web portal. Our contractor developed the whole web portal without using Java Applications, only client-side code, and claims there is no way to capture voice using JavaScript today.
I'm not a Java guy, so I don't have the skills to discuss this, but I'll appreciate any help our folks here in SO can give: if you guys say it can not be done with today technology, so be it...
PS: the solution MUST attend IE, Chrome, Firefox and Safari, for end users, so Canary is out of question for now.
Currently there's no way reliable way to record audio using only HTML5 and JavaScript across browsers.
The only cross browser solution for non Flash recording on desktop browsers in the foreseeable future is the Media Recorder API. It's a recent standard proposal for a JS API who's purpose is to make audio and video recording in the browser very simple. Today it works only in Firefox 27 and only for audio. This article covers the standard in more detail.
If audio recording is important for you today I recommend you check out proven flash solutions like FLVAR or Audior. They work on all browsers, they are reliable and supported. Flash just works and major sites like YouTube and Netflix continue to use it.
The javascript's getUserMedia (getUserMedia on MDN) is a simple way to do this. I suggest you addyosmani's polyfill that has a flash fallback in case the browser doesn't yet support it.
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.
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.
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.
I want to make a basic, 2D fighting game (not fast paced nor does it have many cool effects.)
I could make it with jQuery, but I think that it would run slowly (to my knowledge).
Can anyone give me an alternative to flash for the development of this game?
You might want to check out Processing.js, if you prefer not using browser plug-ins.
Processing.js uses Javascript to draw shapes and manipulate images on the Canvas element. The code is light-weight, simple to learn and makes an ideal tool for visualizing data, creating user-interfaces and developing web-based games.
If you like get this game running on the most computers out there I would go for these technologies:
Flash (fast, and availabable and installed nearly everywhere, frameworks for gameprogramming are out there)
JavaScript (no browser-plugin required, but performance will realy suck, especially at older computers or browsers)
Silverlight (could be suitable, but still a just a very few people have it installed and I do not know if there any good working versions for Mac and Linux)
JavaApplets (lesser installations then Flash, could be fine, altough it seems quite unsexy to use JavaApplets in these days.)
I already saw most options listed, but I thought I'd chime in with another great option that is now free (unless your game makes more than $100K/year and then you must pay a one time $1,500 fee: Unity.
This game generation tool allows you to use a visual developement environment with either javascript, boo or C# to develop games that can be played in a browser, on windows or on a mac. Though it is best known for 3D game development, it certainly supports 2D development.
Here is an example of a browser based 2D game made using Unity.
Bubblemark provides a "performance test" of sorts of all of your available options. I'm biased, but I'd still say Flash.
Jquery is not designed whatsoever to do what you want, flash however is the obvious and ubiquitous solution as far as you're talking about a browser game. If you want something localized, look for graphics packages for whatever language you're comfortable with: pygame[python], gosu[ruby]
Saw this yesterday on reddit: http://www.renderengine.com/demos.php JavaScript game engine
You mentioned jQuery for games, and I recently came across the gameQuery library. Coupled with jQuery 1.4 (with recent performance improvements) and the fact that all major browser vendors are falling over themselves lately to improve JavaScript performance, building a game without Flash or Silverlight is now feasible and productive.
I have also investigated the Raphaël library (raphaeljs.com), a low-level graphics alternative to Processing.js and canvas mentioned earlier. SVG elements are indeed compatible with jQuery. Here's an example of a hex grid on Raphaël with jQuery for click events.
You should check out Effect Games.
It is a free to use, online hosted Javascript Game Engine that runs incredibly smooth and supports all major browsers. Don't believe me? Play this demo, or this one.
Those that say you must use Flash and Javascript is too slow, obviously haven't been paying attention, especially to the newer browser such as Chrome that utilise compiled javascript. Why use Flash, when you can have a cross platform, cross browser game developed using native browser functionality.
You should also check out Chrome Experiments to see just how much current Javascript (and sometimes HTML5) capabliities have improved.
Effect Games provides free, online
tools for building, sharing and
playing your own browser based games.
Your games may include sound effects,
music, and multiple layers of
parallax-scrolling tiles and sprites.
Users can play your games right in
their browsers, without needing any
new plugins or extensions. Publish
your games on your website or blog,
share on social networking sites, and
submit them to our featured games
section!
Build your games using JavaScript and
our custom browser game engine, level
editor, and suite of developer tools.
The Effect Engine supports Mac OS X,
Windows, Linux and all modern browsers
including IE, Firefox, Chrome, Opera
and Safari.
Microsoft Silverlight is similar to flash, but not flash.
Flash can be done in the traditional sense or in Flex if you want it more of a traditional programming experience. Silverlight is a great flash substitute if you would rather do your programming in .net. Javascript games are possible but difficult to do I think you would save a lot of your time if you did it in flash instead.
I believe a great option would be to use SilverSprite. It allows for creating XNA games for Microsoft SilverLight using the same knowledge base you find for Windows and XBOX 360 (only working for 2D games so far)
Panda3D is a full-blown game engine that can make browser-based executables. I have not tested this functionality myself, but it seems to work pretty well.
http://www.panda3d.org
check it out, it rocks.
http://gamejs.org
or any of https://github.com/bebraw/jswiki/wiki/Game-Engines