FMRadio.antennaAvailable
This API is available on Firefox or Firefox OS for installed or higher privileged applications.
Summary
The antennaAvailable
property value indicates if an antenna is plugged and available.
Syntax
JavaScript
Copy Code
var antenna = instanceOfFMRadio.antennaAvailable
Value
Return a boolean.
Example
JavaScript
Copy Code
navigator.mozFMRadio.onantennaavailablechange = function () { if (navigator.mozFMRadio.antennaAvailable) { console.log("An antenna has been pluged"); } else { console.log("The antenna has been unpluged"); } };
Specification
Not part of any specification.
See also
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/antennaavailable