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.
Related
I'm searching a good webbrowser for my project but I can't find one.
I need html5 video streaming (doesn't work in CefSharp) and
I need javascript injecting (doesn't really work in the normal webbrowser)
Thanks for help
CefSharp is able to play html5 video and audio. And here's the list with all the supported audio and video codecs.
Just because CefSharp doesn't include proprietary Audio and Video codecs, doesn't mean it can't. Due to licensing reasons mentioned here, CefSharp is not including them. You can however build cef and embed your own codecs in it.
You can always grab the code from their GitHub Repository and experiment your self considering this great answer on stackoverflow
Or you can use GeckoFx as suggested on another answer posted on similar question on stackoverflow. Which is isn't really a WPF Control, but you can use it with a WindowsFormsHost.
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!
Just found an interesting application here:
http://mydeco.com/3d-planner/
I hear they use Javascript for making this (http://thenextweb.com/apps/2010/05/05/3d-room-planner-mydeco-aims-american-homes-ditches-flash/). Several 3D libraries (like WebGL) don’t run well in every browser, but this room planner works fine in most browsers (Chrome, IE, Firefox, Opera).
Does someone know what Javascript 3D library that can make something like that? I’m really new to something like this, not sure where to start. Honestly, I expect something that can be easy to use.
Or perhaps someone has experiences or suggestions about this? Please share if you do.
Thank you!
Have you looked at three.js? https://github.com/mrdoob/three.js
It uses either <canvas>, <svg>, or WebGL, so it should run in any "modern" browser, including IE9 (but not, I think, earlier versions).
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.