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
Relationships
Because we will be adding a lot of options to AudioReader, we don't want to pollute the
BookReaderprototype namespace with a bunch of facade methods for theSpeechSynthesisEngine. So let's instead defineBookReader.ttsto reference a speech engine, and call methods on that (e.g. Before:BookReader.ttsStart(), we'll haveBookReader.tts.start()).Summary of Requirements
BookReadershould no longer havetts-related methodsBookReadershould have attsobject of typeSpeechSynthesisEnginewhich performs all the methods previously performed by thettsmethodsRelationships