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.
closePlayer()
Close the player if it was opened, does not hide the widget bubble
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 {{TOLSTOY_ID}}
on(eventType, callback)
Trigger a callback on a specific event
Params:
eventType
supported events:
onWidgetOpen - triggers when the widget is opened
onWidgetClose - triggers when the widget is closed