-
Hey folks! I'm putting together a player-ui POC and it's been a long time since I've been in the weeds. Going through the docs, I can't find a simple example of how to retrieve player data. I know there used to be a method on the exposed |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's a good callout, we definitely need better docs around the The most common way to grab data from the player is get get ahold of the player.getState()
reactPlayer.player.getState() The methods change slightly if the flow you're interacting with is currently in-progress or not. If it's in-progress, then you'll use: state.controllers.data.get()
state.controllers.data.serialize() or any of the other methods on the If the flow you're using is completed, then you have access to a |
Beta Was this translation helpful? Give feedback.
That's a good callout, we definitely need better docs around the
player
andreactPlayer
objects. I added an issue for us to publish the API docs as well: #147The most common way to grab data from the player is get get ahold of the
state
object:The methods change slightly if the flow you're interacting with is currently in-progress or not. If it's in-progress, then you'll use:
or any of the other methods on the
DataController
If the flow you're using is completed, then you have access to a
data
property on the completed state, which is the serialized model. We'll likely also in…