Cannot access the mozFMRadio API in the browser - no permission prompt is seen

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
6 years ago
6 years ago

People

(Reporter: jsmith, Assigned: slee)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-basecamp:-, b2g18-)

Details

(Reporter)

Description

6 years ago
Build: B2G18 12/19/2012
Device: Unagi

Steps:

1. Go to http://www.se.rit.edu/~jds2501/webapi_permissions_test.html in the browser
2. Select FM Radio Test

Expected:

A permission prompt should appear asking the user if it's okay to grant this website access to the fmradio.

Actual:

Nothing happens. The error console indicates that navigator.mozFMRadio isn't even defined in a browser context:

12-23 00:05:48.200: E/GeckoConsole(2103): [JavaScript Error: "TypeError: navigator.mozFMRadio is null" {file: "http://www.se.rit.edu/~jds2501/webapi_harnesses.js" line: 45}]

However, the perms matrix indicates that a developer should be able to access this API in the browser with PROMPT_ACTION.
(Reporter)

Updated

6 years ago
blocking-basecamp: --- → ?
(Reporter)

Updated

6 years ago
Blocks: 815565
(Reporter)

Comment 1

6 years ago
Note - if I install a hosted app that calls out a permission for fmradio directly, then I will be able to access the fmradio implicitly in a hosted app.

See http://jds2501.github.com/webapi-permissions-tests/.
I thought we were restricting fmradio permissions to privileged apps.
Flags: needinfo?(slee)
(Reporter)

Comment 3

6 years ago
Data comparison:

Permissions Matrix states that the fmradio permission has the following perms:

* Web Content - PROMPT_ACTION
* Installed Web App - ALLOW_ACTION
* Privileged Web App - ALLOW_ACTION
* Certified Web App - ALLOW_ACTION

Permissions Installer in code states that the fmradio permission has the following perms:

fmradio: {
  app: ALLOW_ACTION,
  privileged: ALLOW_ACTION,
  certified: ALLOW_ACTION
},

Current behavior by testing reflects:

* Web Content - DENY_ACTION
* Installed Web App - ALLOW_ACTION
* Privileged Web App - ALLOW_ACTION
* Certified Web App - ALLOW_ACTION
(Assignee)

Comment 4

6 years ago
Hi all,
We do have permission restrictions for fmradio. I will find out why it does not prompt the page when accessing by web content.
Flags: needinfo?(slee)
(Assignee)

Updated

6 years ago
Assignee: nobody → slee

Comment 5

6 years ago
jonas, what do you want to do here?  should FM be exposed to the web.
Flags: needinfo?(jonas)
This was somethjng we initially intended to do. But given that it hasn't been done yet I think this is a v2 feature.

Especially considering that the API isn't working well with multiple simultaneous users.
blocking-basecamp: ? → -
tracking-b2g18: --- → -
Flags: needinfo?(jonas)
I note that permission has been changed to deny in the basecamp permissions spreadsheet, so I am going to close this. If there is a desire to expose this API to web later, then  that will need a separate bug.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.