Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5936

fluid.textToSpeech.checkTTSSupport uses the wrong event handler name the end of a SpeechSynthesisUtterance

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      In digging into an issue with the Chart Authoring code, I noticed that all the unit tests for the Text to Speech component were passing with a TEST SKIPPED message, even in TTS-supporting browsers. This is visible in http://build.fluidproject.org/infusion/tests/component-tests/textToSpeech/html/TextToSpeech-test.html if you use a browser (such as the latest Chrome) that has TTS support.

      The issue appears to be with the "fluid.textToSpeech.checkTTSSupport" function using an event handler called "onstop" instead of "onend" when configuring the callback handler on the SpeechSynthesisUtterance it uses to test. The correct handler under the current API is "onend", per https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance.

      Changing the handler to the correct one causes the tests to run (with the third set failing in FF, whose TTS is experimental and must be turned on via about:config).

      I'm going to investigate a bit further before I make a PR to make sure nothing aside from the tests uses "fluid.textToSpeech.checkTTSSupport".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aharnum Alan Harnum
              Reporter:
              aharnum Alan Harnum
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: