HTML5 Voice Input mic access - html

How does the HTML5 Voice input on Chrome (Mac) get access to the mic? Is it because I have the google voice plugin installed?
Shouldn't the browser explicitly ask for permission before giving access?
http://slides.html5rocks.com/#speech-input

The microphone isn't directly being exposed to the Web pageā€”it's just posting the speech (and receiving text) through Google servers so it's not considered a security issue (and you have to click the microphone icon to start it). It's pretty similar to how voice input works on Android and Google's iPhone/Blackberry apps.

It is explicitly asking permission before giving access, that's what clicking the microphone icon is.
Think of it more like the <input type="file"> element -- you click "Browse", it shows you your file system, and the browser sends the selected file directly to the server.

For those saying that you can't style the button and it can't be exploited - it was done with Facebook like buttons - http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/
So what's to stop it working for the Google Mic button?

Related

How to assign different apps for mailto handling, depending on the program the link is in?

I use both gmail (through Chrome) and the Outlook desktop app, both on Windows 10.
Right now chrome is set to handle all mailto links, no matter in which program I click a mailto link.
This is not ideal, as any mailto link I click in outlook is opened in gmail. Therefore I would like to set Outlook to handle all mailto links I click in Outlook, and gmail to handle all mailto links I click in Chrome.
When I try to search for solutions, all I find is people describing how to change the mailto handler for Windows, not how to have different handlers depending on which program the click originated from.
If it is not possible using only Windows settings, solutions that involve potential third party software are also welcome.

PWA html5 open device camera as soon as page is launched

i have a pwa where i am showing a standard input tag like below. this let user tap on it and get access to device camera. However, i want to open the camera as sooon as you open the webpage. is it possible?
current code:
<input type="file" accept="image/x-png,image/jpeg,image/gif" capture="camera"/>
Like Mathias said access to the camera is gated behind user permission.
Instead of an input tag like you are using you should really use the Media Capture API.
You have to get the user's permission to access the camera first. Once you have that permission you can connect to the camera and capture photos and video.
Note: Apple has disabled access to camera from homescreen web apps. No idea when they will turn this on. You can access the camera from regular Safari on iOS, just not from a homescreen web app even though it is the same engine.

Chrome* api access from my page js

I want to find out if any tab is playing sound on my webpage. Chrome had chrome.tabs api which tells if a tab is playing any sound. How can I access those chrome apis on my page.
You cannot, unless you make an extension to do that for you.

chrome.desktopCapture throws an error on "tab" as DesktopCaptureSourceType

I am developing a chrome extension, and my point here is to record a browser tab , like Screencastify chrome extension records the browser tab. I referred desktopCapture , a chrome API which works perfectly for "screen" and "window" as DesktopCaptureSourceType, whereas for "tab" as DesktopCaptureSourceType, it throws an error as
desktopCapture.chooseDesktopMedia: Tab capture is not supported yet.
I have configured the required permissions in manifest.json of my extension. Could anyone suggest me a solution?
P.S : I need to record the chrome browser tab only, am not asking for a screen or window recording
This is a known issue: https://crbug.com/488262
However, you can use the chrome.tabCapture api instead. The downside is that you will have to split your interface between capturing tabs and screens/windows, as chrome.tabCapture doesn't provide an equivalent picker.
Why does Google have two separate screen capture apis? Good question.
The stream object generated by the chrome.tabCapture cant be shared outside the plugin code.
You will have to write the code to share the stream to server within the chrome plugin.

Is it possible to allow your camera to be automatically turned on in Google Chrome?

I am using HTML5 canvas, for a facial detection program. Every time I open the page, Chrome asks me if I want to allow access to my cam. I want to allow it and have Chrome remember so I don't have to keep confirming the prompt. I've already seen this link, but it doesn't work for me.
Yes, when Chrome asks you to allow the web app to use camera and microphone. The user must click in the options drop down menu and select "Always allow this site to use this microphone and this camera" instead of clicking on Allow or Deny buttons.