mozilla-extensions / firefox-voice

Firefox Voice is an experiment in a voice-controlled web user agent
Mozilla Public License 2.0
286 stars 122 forks source link

"Play Green Day" displays an error in "Doorhanger" if command is made while in narration mode #482

Open alexandra-martin opened 5 years ago

alexandra-martin commented 5 years ago

Prerequisites:

Mic permissions and autoplay are enabled. User is logged in on Spotify. A text to speech compatible tab is active and in narration mode, like a New York Times article.

STR:

  1. Use the shortcut or click on the mic icon from the browser toolbar.
  2. Say or write a Spotify "Play" command, e.g. "Play Green Day".

Expected result:

Spotify opens in a new tab and starts playing.

Actual result:

An "Internal error: TypeError: service.playQuery is not a function" error is displayed in the "Doorhanger" and Spotify is not opening or playing.

Notes:

Reproduced on Mac 10.14.6 and Win10x64 with Firefox Nightly 72.0a1 (64-bit). The command works as intended if made in other tabs. Reproduced also if the Spotify tab was previously opened and playing. (2nd gif)

6

8

ianb commented 5 years ago

This is a side effect of using the active tab to select the service, which doesn't make sense for a query like this. We need some way of excluding services that don't respond to certain commands (like the reader mode doesn't response to playQuery).