Skip to main content
Returns a fresh array of TapSource objects to register on a core client. Register them through the tapSources config option or registerTapSource(); captureTap() then runs the highest-priority source that can capture here. The array holds two sources, in priority order:
  • redirect (redirectTapSource(), priority 20) - the tap that opened this page, read from its URL. Primary on every platform.
  • web-nfc (webNfcTapSource(), priority 0) - an in-page scan with the device’s own reader, where one is supported. A progressive enhancement over the redirect, not a replacement.
A tap already in the URL wins: the redirect source runs at higher priority than the scanner, so a page opened by a tap resolves from its own URL before any scan starts.

Example

The in-page scan needs a user gesture, so run the unrestricted capture from a control the user pressed - never at page load - so the permission prompt can appear:

Returns

TapSource
required
redirectTapSource() - priority 20. See redirectTapSource.
TapSource
required
webNfcTapSource() - priority 0. In-page scanning on Android Chrome, where supported.
To collect taps your own interface captures (a pasted link, a scanned code), add manualTapSource with client.registerTapSource(...); it is not part of the default set.