Reputation: 10082
The WebFM API provides access to the device FM radio.
You can set the frequency with FMRadio.setFrequency()
.
Does the WebFM API for Firefox OS support LF
and MF
too, or does it only work with VHF
?
- LF Low Frequency 30–300 kHz
- MF Medium Frequency 0,3–3 MHz
- VHF Very High Frequency 30–300 MHz
Unfortunately, the specification at MDN is not clear enough.
Upvotes: 0
Views: 129
Reputation: 300
All the attributes related to frequency (i.e. frequency, channelWidth, frequencyLowerBound, frequencyUpperBound) are in MHz, so technically MF should be supported, but LF won't.
The WebFM API is not a standard API yet (it's moz prefixed: navigator.mozFMRadio), it only works on Firefox OS and device dependent as @timdream said.
BTW, you could find the WebFM API discussion here:
https://groups.google.com/forum/?fromgroups#!topic/mozilla.dev.webapi/PraULCQntqA
https://bugzilla.mozilla.org/show_bug.cgi?id=779500
Upvotes: 2
Reputation: 5922
It's depend on a Gecko pref, which is set by the hardware vendor, so, yes, it's device dependent.
http://dxr.mozilla.org/mozilla-central/source/dom/fmradio/FMRadioService.cpp#64-78
Upvotes: 2