D
D
Daniil Sugonyaev2018-08-21 18:35:32
JavaScript
Daniil Sugonyaev, 2018-08-21 18:35:32

Get data in React from third party library?

There is a third-party library (video player) and there is an application on React. The library generates data (subtitles) and cooks them from its own juice, displays them in the player, and so on. But I would like to intercept this data at the initial stage and get it into a React or Redux state. Is it possible to somehow dispatch them to a store that is connected to React, or somehow push them to the React event stream?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iPirat, 2018-08-21
@iPirat

Write them to a global variable?
window.player=obj;
in react
componentWillMount() {
console.log(window.pleer)
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question