Skip to main content

Settings

We support the following additional configurations for the floating widget:
alwaysShow
boolean
default:"true"
In case a user closed the widget and you want to keep showing it to him.
loadHidden
boolean
default:"true"
Load the widget without showing it.
stopPreviewLoop
boolean
default:"true"
Stop the preview window from endlessly looping.
noCloseOption
boolean
default:"true"
No option to close the widget.
Add the following code to the page in order to set the settings:

start()

Start the widget, open it expanded and plays immediately

startPart(partNumber)

Start the widget at a specific part number, open it expanded and plays immediately. If the widget is already open it will start to play the given part.

show()

Show the widget bubble if it was loaded hidden or closed

hide()

Hide the widget bubble from screen

recreate(tolstoyWidgetId, settings)

Load a new widget with a different Tolstoy Id, remember to replace the

on(eventType, callback)

Trigger a callback on a specific event Params:
eventType
"onWidgetOpen" | "onWidgetClose" | "onWidgetReady" | "onTolstoyClose"
Supported events:onWidgetOpen - triggers when the widget is opened \onWidgetClose - triggers when the widget is closed \onWidgetReady - triggers when the widget is ready \onTolstoyClose - triggers when the tolstoy bubble is closed
callback
function
A function to trigger