Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add pause and resume methods #133

Open
Lechevallier opened this issue Aug 3, 2024 · 0 comments
Open

feat: Add pause and resume methods #133

Lechevallier opened this issue Aug 3, 2024 · 0 comments
Labels
feature Feature

Comments

@Lechevallier
Copy link

Is your feature request related to a problem? Please describe:
I wish this plugin would allow to pause and resume the read.
For example, speechSynthesis allow this, but unfortunately this is not supported on android browser.

Describe the solution you'd like:
As a developer, I expect the 2 following functions to be added to the TextToSpeechPlugin interface:

export interface TextToSpeechPlugin {
    ...
    /**
     * Pause the read.
     */
    pause(): Promise<void>;
    /**
     * Resume the read.
     */
    resume(): Promise<void>;

Describe alternatives you've considered:
As said before, I tried speechSynthesis, but this is not supported for android browser.

window.speechSynthesis.start("Hello world");
window.speechSynthesis.pause();
window.speechSynthesis.resume();

Additional context:
Expected behaviour:

  • open this demo
  • click "Interrupt" to start the read
  • click the play/pause button to pause the read
  • click the play/pause button to resume the read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature
Projects
None yet
Development

No branches or pull requests

2 participants