f



Peripheral access on mobile

I've asked this question here before, but.... what progress on letting mobile Firefox access the mic, GPS etc?




Thanks.
0
bit
11/14/2016 1:17:34 PM
comp.lang.javascript 38370 articles. 0 followers. javascript4 (1315) is leader. Post Follow

5 Replies
54 Views

Similar Articles

[PageSpeed] 51

bit-naughty@hotmail.com wrote:

>I've asked this question here before, but.... what progress on letting 
>mobile Firefox access the mic, GPS etc?

I don't know about the mic, but there's been a geolocation facility in
HTML5 for quite a few years now.
http://www.w3schools.com/html/html5_geolocation.asp or google it on
your own.

-- 
Tim Slattery
tim <at> risingdove <dot> com
0
Tim
11/14/2016 3:40:35 PM
Tim Slattery wrote:

> bit-naughty@hotmail.com wrote:
>> I've asked this question here before, but.... what progress on letting
>> mobile Firefox access the mic, GPS etc?
> 
> I don't know about the mic, but there's been a geolocation facility in
> HTML5 for quite a few years now.
> http://www.w3schools.com/html/html5_geolocation.asp or google it on
> your own.

As I have said many time before, W3Schools is not a reliable development 
resource, and this is just one more example of that.  

“navigator.geolocation.getCurrentPosition()” does _not_ throw an exception 
except when the method itself is not implemented, and probability of that is 
low if, as the previous test ascertained, “navigator.geolocation” is a true-
value.  So the example code and the explanation there are bogus.  Instead, 
the second argument to getCurrentPosition() can be a reference to a function 
that is called if an error occurs.

Also, Geolocation support stopped working in Chrome for sites that were not 
served via HTTPS recently (there is a message in the console saying that if 
you do not provide an error callback; otherwise the “message” property of 
the PositionError instance says so), and the same appears to be true for 
(Mobile) Firefox.  That is, if getCurrentPosition() is called in Firefox, 
user authorization is requested, but if confirmed, nothing happens; in 
Chrome, not even the authorization dialog is displayed.  (I have seen that 
on the homepage of my Web site which is not served via HTTPS yet.)

<https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
0
Thomas
11/14/2016 4:59:14 PM
Tim Slattery wrote:

> bit-naughty@hotmail.com wrote:
>> I've asked this question here before, but.... what progress on letting
>> mobile Firefox access the mic, GPS etc?
> 
> I don't know about the mic, but there's been a geolocation facility in
> HTML5 for quite a few years now.
> http://www.w3schools.com/html/html5_geolocation.asp or google it on
> your own.

As I have said many times before, W3Schools is not a reliable development 
resource, and this is just one more example of that.  

“navigator.geolocation.getCurrentPosition()” does _not_ throw an exception 
except when the method itself is not implemented, and probability of that is 
low if, as the previous test ascertained, “navigator.geolocation” is a true-
value.  So the example code and the explanation there are bogus.  Instead, 
the second argument to getCurrentPosition() can be a reference to a function 
that is called if an error occurs.

Also, Geolocation support stopped working in Chrome for sites that were not 
served via HTTPS recently (there is a message in the console saying that if 
you do not provide an error callback; otherwise the “message” property of 
the PositionError instance says so), and the same appears to be true for 
(Mobile) Firefox.  That is, if getCurrentPosition() is called in Firefox, 
user authorization is requested, but if confirmed, nothing happens; in 
Chrome, not even the authorization dialog is displayed.  (I have seen that 
on the homepage of my Web site which is not served via HTTPS yet.)

<https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
0
Thomas
11/14/2016 4:59:51 PM
On Mon, 14 Nov 2016 05:17:34 -0800 (PST), bit-naughty@hotmail.com wrote:
> I've asked this question here before, but.... what progress on letting mobile Firefox access the mic, GPS etc?
> 
> Thanks.

Mic and camera can be accessed from MediaDevices.

<https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices>
0
JJ
11/15/2016 11:17:52 AM
On Monday, November 14, 2016 at 10:59:56 AM UTC-6, Thomas 'PointedEars' Lahn wrote:

> As I have said many times before, W3Schools is not a reliable development 
> resource, and this is just one more example of that.  

+1000
0
Michael
11/16/2016 7:51:35 AM
Reply: