html5 web audio recording: is input source selection possible? - html

Please take a look at this web audio recording example by Chris Wilson:
http://webaudiodemos.appspot.com/AudioRecorder/index.html
Here the default browser behaviour is asking the user permission, if granted audio gets captured. However there is no information about the input source. I guess it's defaults to the microphone.
Is it possible to give the user a prompt for selecting the desired input (for someone who has a fancy/professional sound card with many input channels) before recording audio with html5?
Thanks

No. You cannot know or set the audio input or output with client-side javascript.

Related

When will SpeechSynthesis.speak work on iOS Safari?

I've been exploring the limits on SpeechSynthesis.speak on iOS Safari. I believe the current rules are more restrictive than there were in the recent past.
Are the rules documented anywhere?
These are the rules that I think apply.
Speak in direct response to a click on a <button> always works.
After the initial speak initiated by a button click additional speaks are allowed on the same page. They may be triggered programmatically by timers or whatever.
Initial speak on a change/input event does not work.
Initial speak on a click event on a <tr> does not work.
Any change of page, relative or not, puts you back to square one requiring a direct user action.
When a speak is suppressed you don't get any events nor any error indication.
You want tell if the speak was suppressed by watching for SpeechSynthesis.speaking and timing out if it isn't seen after some delay.
Are these consistent with your recent experience?
I've been testing on BrowserStack watching the events that get fired to determine which cases work.
I can confirm that you can't use SpeechSynthesisUtterance programmatically without a user action before. In my case I have in my web app a button to enable/disable audio, if the user enable the audio and later I try to speak something, it doesn't work
To solve it I had to trigger a fake speak (empty text new SpeechSynthesisUtterance('')) right after the user click on enable audio and then the audio works during all the session.

Html 5 Input accept Video Capture or Video Upload

Using HTML 5 it is now possible to use video capture on an input like so:
<input type="file" accept="video/*" capture="camcorder"/>
The OS of the mobile device drops into the recorder immediately and allows video capture.
The problem is, on most mobile devices it doesn't give you an option to use an existing video file.
However, I'm looking for a way to give the user a choice: Either Capture New Video or Upload an Existing Video.
I believe one solution would be to make 2 inputs (one for live capture and the other for a file upload) and then prompt the user for which one they desire.
My question is:
Is there additional information I can put on a SINGLE input that will allow the user (or tell the OS device) to allow capture or allow upload?
Something that might look like this:
<input type="file" accept="video/*" capture="camcorder;fileupload"/>
The above code is not functional just what I might believe to be a future solution.
It seems silly that most mobile OS's don't allow the user to select an existing file, since the end result is generally the same: The user is selecting a file on the system to upload.
they need to improve INPUT with better attributes....
if your on https you can do it in code....
You gain access to camera with the users permission....
Yet its open to anything.<--wrong way
The best way is by Input with good attributes no permission needed with code.
The Input provides the way to grant or not grant by the action at hand by the user...
Access to mic feed input... a bowser dialog
Camera take picture input jpg with size and quality...
Its the user doing it not your code.....

Allow Camera in webpage with dalekjs

I have got a webpage where people are able to chat together and see each other through a webcam. Now for some reason i cannot set this option in chrome to always allow the camera.
Is there a way to let dalekjs do that work for me? Or any suggestion on how to pre-set this in chrome? Thanks in advance!
I do not know if there is a flag for enabling the camera access, or on the other hand, disabling the dialog that asks for permission; but if there is one, you can apply it using your Dalekfile like described in this pull request: https://github.com/dalekjs/dalek-browser-chrome/pull/8

Why does the HTML5 continuous listening sample have to ask for mic permission every time?

Why does the speech reco code on this page fall under the constraint of having to ask the user to allow permission every reco session on a non-HTTPS URL:
http://updates.html5rocks.com/tag/voice
when the plain jane push-to-talk HTML5 speech input button does not as you can see on this page:
http://www.web2voice.com/chrome-speech-input.html
The first sample is the HTML5 rocks sample and does continuous speech recognition. As that page says:
"Pages hosted on HTTPS do not need to ask repeatedly for permission, whereas HTTP hosted pages do."
But I am trying to figure out why HTML5 speech reco audio input behaves different in push-to-talk mode. The second example is my HTML5 speech reco demo page that uses the plain jane web x-webkit-speech button. My sample, that uses the push-to-talk x-webkit-speech button, only has to ask for permission once and from that point on mic usage is allowed, even between completely new browser sessions. What is it about the HTML5 continuous listening sample that puts it in a far more restrictive category?

Adobe Flash player Secuirty Pop-Up question

I am building a Audio Recording tool using Flash and Wowza.
I dont want to start the recording until the use clicks the Allow Button is the Security Pop-up question represented here http://www.macromedia.com/support/documentation/en/flashplayer/help/help05.html
In Audio I dont get this until I attach the stream to it. In Video can get thsi question when I attach the camera to Video.
I want to avoid making a connection until the user clicks Accept and this doesn't happen until I make the connection request in Audio.
I am able to display the http://www.macromedia.com/support/documentation/en/flashplayer/help/help09.html pop-up using SecurityManager
Is there a way I can call the pop-up from my code. http://www.macromedia.com/support/documentation/en/flashplayer/help/help05.html
The very last point in the last link you posted answers your question.
How can I display this question again?
You can't. Flash Player displays this
question automatically when necessary.
Sorry bout that!