FMRadio.disable()
This API is available on Firefox or Firefox OS for installed or higher privileged applications.
Summary
The disable
method is used to turn off the radio.
Each time this method is called successfully, the disabled
event is fired.
Syntax
JavaScript
Copy Code
var request = instanceOfFMRadio.disable();
Returns
It returns a DOMRequest
to handle the success or error of the operation.
Example
JavaScript
Copy Code
var request = navigator.mozFMRadio.disable(100.0); request.onsuccess = function () { console.log("The radio is turned off"); } request.onerror = function () { console.log("Something goes wrong!"); }
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/disable