Skip to content

Legilo 0.2.0

Choose a tag to compare

@asisto asisto released this 01 Oct 09:37
· 3 commits to main since this release

Page integration release: the widget now tells your page what it does, so sites with their own controls, iframes or audio (e.g. 3D tours) can follow along. Includes the changes of 0.1.1.

Events (new in 0.2.0)

Plain DOM events on document. They stay in the browser, nothing is sent anywhere.

  • legilo:change on every change of a setting: panel, profile, reset, API, the automatic end of "Read page", and once after loading when stored settings were applied. detail: { key, level, states, rate, values, source, profile }. Fires only on real changes, so a handler may call Legilo.set() without causing a loop.
  • legilo:open / legilo:close when the panel opens or closes
  • legilo:speechstart / legilo:speechend when the voice really starts and ends, exactly once per start (e.g. to pause background music)

JavaScript API

  • Legilo.values(): actual values of the active settings (font scale, spacing, font family, dyslexia font URL and @font-face CSS), to carry them over into your own iframes
  • Legilo.isOpen(): panel state
  • Legilo.speak(text, { interrupt }) and Legilo.stopSpeaking() (0.1.1): announce your own texts through the read-aloud engine. Speaks only while the visitor has turned read-aloud on, never uninvited.
  • Legilo.features() lists the offered read-aloud modes as allowed

Widget

  • New parameter tts=both|read|hover: choose which read-aloud modes the button offers (e.g. tts=hover for 3D tours)
  • Font size and "Point & read" now also cover elements with their own text, e.g. a div with a direct text node; icons stay untouched
  • Read-aloud skips hidden text (display:none, visibility:hidden, hidden, aria-hidden="true")
  • Fix: nested elements (e.g. a link inside a paragraph) were scaled twice at larger font sizes
  • Big cursor, reading guide and reading mask also work inside same-origin iframes (0.1.1)
  • With hide=1 a click outside no longer closes the panel, so your own button toggles it reliably (0.1.1)
  • legilo.js is now cached for 1 hour instead of 24 hours; unknown parameters are ignored, so &v=0.2.0 works as a cache buster

Configurator and project page

  • New "Read-aloud modes" option in the configurator (all 11 languages)
  • Developer reference with the new events section: https://legilo.eu/api
  • Refreshed design of the API and legal notice pages (0.1.1)

WordPress

Plugin 0.1.2 attached below (legilo-wordpress.zip): native settings page with an import field for legilo.eu embed codes and the new read-aloud mode setting.