MAIDR JavaScript API
    Preparing search index...

    The tactile display the reader is using, whichever kind it is.

    Each kind of display has a driver of its own, and the reader uses one at a time. This is the one the tactile service draws through and the Settings dialog connects through: it passes everything to the driver in use and passes on only that driver's events, so neither of them has to know which device is on the desk.

    The driver in use is the one the reader last connected, or the one that last came up on its own. A display that comes up replaces any other that was connected: two would be drawn on at once, and only one of them is under the reader's hands.

    Index

    Constructors

    Properties

    onStateChange: Event<DotPadState> = ...

    Fires whenever the connection state of the display in use changes.

    onWriteFailure: Event<void> = ...

    Fires when a write to the display in use was refused.

    onKey: Event<DotPadKey> = ...

    Fires when a key on the display in use is pressed.

    Accessors

    • get isConnected(): boolean

      True when the display in use is connected and ready for output.

      Returns boolean

    • get breaksTextAtWords(): boolean

      True when the display in use breaks its text line between words.

      Returns boolean

    • get isSupported(): boolean

      True when this browser can reach any kind of display MAIDR drives.

      Returns boolean

    Methods

    • Fetches what connecting to a device would otherwise wait on.

      Parameters

      • deviceId: string | null = null

        The device the reader picked, or null when none yet

      Returns Promise<void>

    • Opens the browser's device picker for one transport and connects to the chosen display, which becomes the one in use.

      Must be reached synchronously from the reader's click: nothing is awaited before the driver opens its picker.

      Parameters

      Returns Promise<DotPadState>

      The connection state once the attempt settles

    • Takes up a display the page was already granted, quietly.

      The kind the reader chose in Settings is asked first, then the rest: a page may have been granted more than one, and the reader's choice is the one they are reading with.

      Returns Promise<boolean>

      True when a display was taken up

    • Translates text for the display in use's text line.

      Parameters

      • text: string

        The text to translate

      Returns Promise<string | null>

      Hex braille cells, or null when the caller should fall back

    • Sends a whole graphic frame to the display in use.

      Parameters

      • hex: string

        The frame, packed as DotPack.graphic packs it

      Returns void

    • Sends one row of cells of the graphic area to the display in use.

      Parameters

      • cellRow: number

        Zero-based cell row

      • hex: string

        The row, packed as DotPack.graphicRow packs it

      Returns void

    • Sends the braille text line to the display in use.

      Parameters

      • hex: string

        The line's cells, bit 0 being dot 1

      Returns void

    • Buzzes the display in use.

      Parameters

      • OptionalonFailure: () => void

        Called when the device refused after the request was queued

      Returns boolean

      False when the display cannot vibrate