FMRadio.cancelSeek()

This API is available on Firefox or Firefox OS for installed or higher privileged applications.

Summary

The cancelSeek method is used to tell the radio to stop seeking for frequencies.

Syntax

JavaScript
var request = instanceOfFMRadio.cancelSeek();

Returns

It returns a DOMRequest to handle the success or error of the operation.

Example

JavaScript
navigator.mozFMRadio.seekUp();

window.onfrenquencychange = function () {
  var request = navigator.mozFMRadio.cancelSeek();
 
  request.onsuccess = function () {
    console.log("Ok, let's stop seeking.");
  }

  request.onerror = function () {
    console.log("Mmmh... ok, but there is actually nothing to cancel.");
  }
}

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/cancelseek

API B2G Firefox OS FMRadio API Method Reference Référence WebFM