@capacitor/screen-reader
The Screen Reader API provides access to TalkBack/VoiceOver/etc. and provides simple text-to-speech capabilities for visual accessibility.
Last updated 7 days ago by dwieeb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @capacitor/screen-reader 
SYNC missed versions from official npm registry.

@capacitor/screen-reader

The Screen Reader API provides access to TalkBack/VoiceOver/etc. and provides simple text-to-speech capabilities for visual accessibility.

API

isEnabled()

isEnabled() => Promise<{ value: boolean; }>

Whether a Screen Reader is currently active.

This method is not supported on web (it is not possible to detect Screen Readers).

Returns: Promise<{ value: boolean; }>

Since: 1.0.0


speak(...)

speak(options: ScreenReaderSpeakOptions) => Promise<void>

Text-to-Speech functionality.

This function will only work if a Screen Reader is currently active.

On web, browsers must support the SpeechSynthesis API, or this method will throw an error.

For more text-to-speech capabilities, please see the Capacitor Community Text-to-Speech plugin.

Param Type
options ScreenReaderSpeakOptions

Returns: Promise<void>

Since: 1.0.0


addListener(...)

addListener(eventName: 'screenReaderStateChange', listener: ScreenReaderStateChangeListener) => PluginListenerHandle

Add a listener

This method is not supported on web (it is not possible to detect Screen Readers).

Param Type
eventName "screenReaderStateChange"
listener (state: { value: boolean; }) => any

Returns: PluginListenerHandle

Since: 1.0.0


removeAllListeners()

removeAllListeners() => void

Remove all the listeners that are attached to this plugin.

Returns: void

Since: 1.0.0


Interfaces

ScreenReaderSpeakOptions

Prop Type Description Since
value string The text to speak. 1.0.0
language string The language to speak the text in, as its ISO 639-1 Code (e.g.: "en"). This option is only supported on Android. 1.0.0

PluginListenerHandle

Prop Type
remove () => void

Current Tags

  • 0.0.2                                ...           latest (7 days ago)

2 Versions

  • 0.0.2                                ...           7 days ago
  • 0.0.1                                ...           2 months ago
Downloads
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 11
Last Month 10
Dependencies (0)
None
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |