onInstallLanguageRequest property

EventStream<OnInstallLanguageRequestEvent> get onInstallLanguageRequest

Fired when a TTS client requests to install a new language. The engine should attempt to download and install the language, and call ttsEngine.updateLanguage with the result. On success, the engine should also call ttsEngine.updateVoices to register the newly available voices.

Implementation

EventStream<OnInstallLanguageRequestEvent> get onInstallLanguageRequest =>
    $js.chrome.ttsEngine.onInstallLanguageRequest.asStream(($c) => (
          $js.TtsClient requestor,
          String lang,
        ) {
          return $c(OnInstallLanguageRequestEvent(
            requestor: TtsClient.fromJS(requestor),
            lang: lang,
          ));
        }.toJS);