Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
Unmute other tabs as soon as you start typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed Sep 30, 2019
1 parent c898ee9 commit 21d84fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extension/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ this.popup = (function() {
recorder.onBeginRecording = () => {
browser.runtime.sendMessage({ type: "microphoneStarted" });
ui.setState("listening");
ui.onStartTextInput = () => {
ui.onStartTextInput = async () => {
await browser.runtime.sendMessage({ type: "microphoneStopped" });
log.debug("detected text from the popup");
recorder.cancel(); // not sure if this is working as expected?
};
ui.onTextInput = text => {
ui.onTextInput = async text => {
await browser.runtime.sendMessage({ type: "microphoneStopped" });
ui.setState("success");
ui.setTranscript(text);
executedIntent = true;
Expand Down

0 comments on commit 21d84fb

Please sign in to comment.