FMRadio.frequency
This API is available on Firefox or Firefox OS for installed or higher privileged applications.
Summary
The frequency
property value returns the current radio frequency.
Syntax
JavaScript
Copy Code
var frequency = instanceOfFMRadio.frequency
Value
Return a number representing the radio frenquence express in MHz (MegaHertz).
Example
JavaScript
Copy Code
window.addEventListener('frequencychange', function () { console.log("The frequency has changed to: " + navigator.mozFMRadio.frequency + "MHz"); });
Specification
Not part of any specification.
See also
FMRadio
FMRadio.onfrequencychange
- The
frequencychange
event.
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/fmradio/frequency