Speak Text Panel API
Speak Text Panel Overview
Allows users to turn on/off the text to speech. This component uses Yes/No Panel as a base grade so it has the same component structure as Yes/No Panel in aspect of the model, options, selectors and dependencies.
On This Page
Still need help?
Join the infusion-users mailing list and ask your questions there.
Adding a Speak Text Panel to a Component/Grade
Option 1: Typically the Speak Text Panel is integrated into the first discovery tool by supplying as a type option in an Auxiliary Schema:
"speakText": { "type": "gpii.firstDiscovery.speak", "panel": { "type": "gpii.firstDiscovery.panel.speakText", "container": ".gpiic-fd-prefsEditor-panel-speakText", "template": "%prefix/yesNo.html", "message": "%prefix/speakText.json" } }
Working in conjunction with the Auxiliary Schema, the type and its default value of the speak text preference are defined in the Primary Schema:
fluid.defaults("gpii.firstDiscovery.schemas.speak", { gradeNames: ["autoInit", "fluid.prefs.schemas"], schema: { "gpii.firstDiscovery.speak": { "type": "boolean", "default": true } } });
Option 2: Adding as a stand alone component:
var myPanel = gpii.firstDiscovery.panel.contrast(container, options);
Grades
The base grades used by the Speak Text Panel: