-
Hello! Is there a way when using multiple values in a listener, where some are computed values based on another of the values, to have the computed values update before the callback function triggers? Example sandbox: I have a computed value based on another value: in the example, it's The three ways I've tested it is
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Sorry, I don’t get the task. In an example |
Beta Was this translation helpful? Give feedback.
Got it. The problem is that
currentPlaylistItem.listen(loadPlayer)
is running before thecurrentFPS
update (sincecomputed()
use the samecurrentPlaylistItem.listen
and listeners are executed by the order)?The simplest solution without overcomplicating is to create
getFPS(playlistItem)
and use it in listener.More complex solution is to create store
playerOptions
computed fromcurrentPlaylistItem
andcurrentFPS
and init player onplayerOptions
changes.