Closed FlorianPAZE closed 1 year ago
@FlorianPAZE - try upgrading the runtime lib to @rive-app/canvas: 1.1.5
. This ensures that if you set autoplay: false
and start play()
with a state machine, Rive Listeners should be enabled.
Closing for now but feel free to re-open the issue if you still have issues with this!
Description
In the example shown below, we have set autoplay to false, in order to start the playback after the "Okay" button is clicked. However, doing so, the state machine does in fact start playing - however the listeners for hover and click that we have on the state machine are not registered and don't work anymore. Setting the autplay to true works just fine.
Provide a Repro
This example shows the issue: https://codepen.io/florianpaze/pen/abRpbaQ/479047d396a701b7c996a2a344185dbb
Source
.riv
/.rev
file(.riv file is linked in the codepen JS)
Expected behavior
Even if autoplay is set to false, the listeners should be properly registered, so that we can use playback controls after the fact without loosing the listener interactions.