Adjust listener for kaltura#1226
Conversation
Fixes cookpete#1202 and related to cookpete#1082.
As mentioned in cookpete#1225 `findDOMNode` is deprecated.
|
Hi @Yasamato . Thank you so much for this!!! I'm confirming you've fixed the seeking action. With this PR, I'm having some trouble with the Play/Pause toggle, but I believe this is fixed if you add "autoplay" to the Kaltura iframe:
|
|
I'm on a Mac and I use Chrome as a browser. |
| load (url) { | ||
| // wait what? | ||
| } |
There was a problem hiding this comment.
I don't think you can just move all of this logic to componentDidMount. What happens when the url changes from one Kaltura video to another?
There was a problem hiding this comment.
Oh that's right! I think I totally missed that and was just a bit confused about it...
There was a problem hiding this comment.
I looked again over it, but if you take a closer look over the original and the modified code from me, there is no use of the url parameter. When you change the video from one to another I doubt it ever get's called tbh... did not check nor validate it thou.
Moved it back to load and calling it now in componentDidMount
Co-authored-by: Pete Cook <pete@cookpete.com>
|
Published in |
Fixes #1202 and related to #1082.
Strangely it is necessary to wait a bit for the player to be ready, even after the
onReadyevent fired. Otherwise the added event listeners would just be ignored as there is no warning or error message.After my adjustments I can now consistently reproduce seeking (in-player and via react-player), play/pause (in-player and via react-player).
Nevertheless there is still no support for:
Manual investigation (
console.log(this.player.events)) of the API shows, that the internal player only supports these events: