I'm looking to record audio in Chrome without using Flash or Silverlight and then store it in a database or on a server using PHP and MySQL.
The only way I've seen this done is via getUserMedia and some JS in HTML5.
For example:
http://webaudiodemos.appspot.com/AudioRecorder/index.html
I got the source of github here:
https://github.com/cwilso/AudioRecorder
The problem is it doesn't seem to work on my localhost. In fact, the index.html that was included is exactly the same as the hosted version. The hosted version works, but when the same thing is run on my local machine it throws an error saying it can't getUserMedia().
Has anyone implemented something similar or have any insight? Thanks a lot!
For each browser it uses it's own prefix, so for chrome it's webkitGetUserMedia()
see Mozilla's page here for more info on the different prefixes:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getUserMedia
I saw you mentioned localhost, but if you are trying to access the site via file:/// instead of actually using http://localhost (a web server) Chrome will block access to getUserMedia.
If you are trying to access it using file:/// then you need to open Chrome with the command line argument of --allow-file-access-from-files
The following gitHub project records audio to MP3 format directly from the browser using HTML5 and JS only.
It works both on Chrome and Firefox as of now.
https://github.com/nusofthq/Recordmp3js
For a more detailed look at the implementation you can read the blog post:
http://nusofthq.com/blog/recording-mp3-using-only-html5-and-javascript-recordmp3-js/
Related
After updated the chrome browser the WebSQL not working from local files, but it is working from server like IIS,Xampp or other. How can I Access the webSQL without using server.
This seems to be a bug.
See Chromium bug report
It is fixed in currently available Beta Chrome version ( 52.0.2743.60 beta-m ).
You can also use Safari browser, which have a pretty safe implementation of WebSql API.
there is no way as latest updates of chrome and opera have put a restriction on code accessing client-side websql database to be accessible from server hosted code only
I have recently updated my desktop chrome and mobile android chrome.
Since that I have trouble getting my location. It doesn't work with my website JS geolocation script nor here:
http://html5demos.com/geo
It just says failed. I have tried removing location access privilege and changing to ask but it doesn't work.. Any idea what is the reason for that.
You will need to have WAMP accept requests on port 443 and create a certificate in order for the browsers to not complain. There are detailed instructions here: http://www.lmhproductions.com/31/how-to-setup-ssl-on-wamp/
I'm trying to develop a Chrome App that will work together with a Chrome Extension that I already created, wherein the Chrome Extension will send information to the Chrome App.
For this communication I thought use the WebSocket locally, in Chrome Extension I managed to make the Client, but now I'm having difficulty in creating the Server in the Chrome App, because I wanted to make as simple as possible without having to install something beyond of the Chrome App.
Among the first Google results there is a sample app from Chrome team: Http WebSocket Server.
You've got to understand that making a server in Chrome Apps is difficult; you are given access to a raw socket, and you need to fully implement the protocol that a particular server must use. Even a HTTP server is non-trivial, WebSockets is even less so.
So: it's possible, but it's not simple unless you're using an existing library.
Just to add to the accepted answer:
There is a Chrome Extension already in the Chrome Web Store: Web Server for Chrome.
And it is opensource: GitHub Link. You can use it as a library to your Chrome App.
Cheers!
I have linked to the Jquery library at google in my header, and my local copy of the Galleria Javascript file - as the instructions on the Galleria website said to do.
The code functions perfectly in Chrome. However, when attempting to view the site in IE9 I am faced with "Internet Explorer restricted this webpage from running scripts or ActiveX controls." This is preventing (without user input) the Javascript/Jquery/Galleria stuff to function; it is also prevented an embedded Youtube video from displaying.
What am I missing - plenty of other websites use these functions and I don't get IE giving this message. What do I need to add or change?
I am viewing the website from my PC - it is stored locally at the moment.
Cheers!
This is happening because you are running your website locally. You can be sure that this will not happen once you upload it to a webserver.
You can also run a local webserver. I can recommend WAMP:
http://www.wampserver.com/en/
Using the PeerConnection Demo 1 Here: https://webrtc-demos.appspot.com/html/pc1.html Would there be support to run this over an XAMPP sever on Localhost and being able to connect two PC's together? It looks like there would be support, but I cannot get it to work. Any Javascript/HTML experts know what I am missing?
The demo you linked only works in my Chrome Canary.
Try using this: http://simpl.info/peerconnection/ and https://apprtc.appspot.com.
Adapter.js (used in the apprtc link) enables cross-browser usage, and easy transition when prefixes are removed from the apis - very easy to implement.
I have both running on a local MAMPP server and only the latter needed some edits to get local video working. exchanging session descriptions for my local apprtc implementation is something i hope to have done very soon!