Skip to content

Refactor plugin.tts.js to not expose SpeechEngine methods on BookReader #138

@cdrini

Description

@cdrini

Because we will be adding a lot of options to AudioReader, we don't want to pollute the BookReader prototype namespace with a bunch of facade methods for the SpeechSynthesisEngine. So let's instead define BookReader.tts to reference a speech engine, and call methods on that (e.g. Before: BookReader.ttsStart(), we'll have BookReader.tts.start()).

Summary of Requirements

  • BookReader should no longer have tts-related methods
  • BookReader should have a tts object of type SpeechSynthesisEngine which performs all the methods previously performed by the tts methods
  • Law of refactor: there should be no observable changes.

Relationships

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions