Skip to content

Example of retrieving data #146

Answered by adierkens
jwils0n asked this question in Q&A
Aug 31, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

That's a good callout, we definitely need better docs around the player and reactPlayer objects. I added an issue for us to publish the API docs as well: #147

The most common way to grab data from the player is get get ahold of the state object:

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 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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jwils0n
Comment options

Answer selected by jwils0n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants