Read aloud feature service.
More...
Read aloud feature service.
- See also
- PDFViewer.getReadAloudService
- Since
- 8.0.0
◆ onReadPageEnd()
ReadAloudService::onReadPageEnd |
( |
|
callback:(pageIndex:number), |
|
|
|
void |
|
) |
| |
|
inline |
Add event listener to trigger callback function when the page reading is over.
- Parameters
-
callback | (pageIndex: number) => void - Event callback function |
- Returns
- ()=>void - A function used to remove event listener.
- Since
- 8.0.0
◆ onReadPageStart()
ReadAloudService::onReadPageStart |
( |
|
callback:(pageIndex:number), |
|
|
|
void |
|
) |
| |
|
inline |
Add event listener to trigger callback function when read to a page.
- Parameters
-
callback | (pageIndex: number) => void - Event callback function |
- Returns
- ()=>void - A function used to remove event listener.
- Since
- 8.0.0
◆ onStatusChange()
ReadAloudService::onStatusChange |
( |
|
callback:(status:PDFTextToSpeechSynthesisStatus), |
|
|
|
void |
|
) |
| |
|
inline |
Add a callback to monitor the status changes.
- Parameters
-
- Returns
- ()=>void - Returns a function to remove this monitoring.
- Since
- 8.0.0
◆ pause()
ReadAloudService::pause |
( |
| ) |
|
|
inline |
Pause reading out loud.
- Since
- 8.0.0
- Returns
- void
◆ readPages()
ReadAloudService::readPages |
( |
|
pageIndexes:number[], |
|
|
|
options?:Partial< ReadAloudOptions > |
|
) |
| |
|
inline |
Read the list of pages according to the given options.
- Parameters
-
pageIndexes | number[] - List of page numbers to be read aloud. |
options | Partial<ReadAloudOptions> - |
- Since
- 8.0.0
- Returns
- Promise<void>
◆ readText()
ReadAloudService::readText |
( |
|
info:ReadAloudTextInformation, |
|
|
|
options?:Partial< ReadAloudOptions > |
|
) |
| |
|
inline |
Read aloud the specified text content.
- Parameters
-
- Since
- 8.0.0
- Returns
- Promise<void>
◆ resume()
ReadAloudService::resume |
( |
| ) |
|
|
inline |
Resume reading out loud.
- Since
- 8.0.0
- Returns
- void
◆ setRate()
ReadAloudService::setRate |
( |
|
rate:number | ) |
|
|
inline |
Adjust the speed to be faster or slower.
- Parameters
-
rate | number - Between 0.1 (lowest) and 10 (highest), 1 is normal speech rate. |
- Returns
- void
- Since
- 8.0.0
◆ setSpeechSynthesis()
ReadAloudService::setSpeechSynthesis |
( |
|
speechSynthesis:PDFTextToSpeechSynthesis | ) |
|
|
inline |
Overwrites the built-in synthesizer using a custom voice synthesizer.
- Parameters
-
- Since
- 8.0.0
◆ setVolume()
ReadAloudService::setVolume |
( |
|
volume:number | ) |
|
|
inline |
Turn the voice up and down.
- Parameters
-
volume | number - Between 0 (lowest) and 1 (highest.) |
- Since
- 8.0.0
- Returns
- void
◆ status()
◆ stop()
ReadAloudService::stop |
( |
| ) |
|
|
inline |
Stop reading out loud.
- Since
- 8.0.0
- Returns
- void
◆ supported()
ReadAloudService::supported |
( |
| ) |
|
|
inline |
Check if the current browser supports read aloud.
- Returns
- boolean -
- Since
- 8.0.0
◆ updatePlayingOptions()
ReadAloudService::updatePlayingOptions |
( |
|
options:Partial< ReadAloudOptions > | ) |
|
|
inline |
Update the playing speech synthesizer parameters.
- Parameters
-
- Returns
- boolean - Returns true if it is being read and the options is in effect, otherwise false.
- Since
- 8.0.0