Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust listener for kaltura #1226

Merged
merged 6 commits into from
Feb 20, 2022
Merged

Adjust listener for kaltura #1226

merged 6 commits into from
Feb 20, 2022

Conversation

Yasamato
Copy link
Contributor

@Yasamato Yasamato commented Apr 30, 2021

Fixes #1202 and related to #1082.

Strangely it is necessary to wait a bit for the player to be ready, even after the onReady event 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:

  • playbackRate
  • volume update (setting inside the player won't propagate to react-player)
  • controls option

Manual investigation (console.log(this.player.events)) of the API shows, that the internal player only supports these events:

  • "ready"
  • "play"
  • "pause"
  • "ended"
  • "timeupdate"
  • "progress"
  • "error"

As mentioned in cookpete#1225 `findDOMNode` is deprecated.
@kangaree
Copy link

kangaree commented May 2, 2021

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:

<iframe ref={this.ref} src={this.props.url} frameBorder="0" scrolling="no" style={style} allowFullScreen allow="encrypted-media;autoplay" referrerPolicy="no-referrer-when-downgrade" />

@kangaree
Copy link

kangaree commented May 2, 2021

I'm on a Mac and I use Chrome as a browser.

Comment on lines 38 to 40
load (url) {
// wait what?
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's right! I think I totally missed that and was just a bit confused about it...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

src/players/Kaltura.js Outdated Show resolved Hide resolved
src/players/Kaltura.js Outdated Show resolved Hide resolved
Yasamato and others added 2 commits February 20, 2022 10:27
@cookpete cookpete merged commit e2afc10 into cookpete:master Feb 20, 2022
@cookpete
Copy link
Owner

Published in 2.10.0

@Yasamato Yasamato deleted the fix-kaltura branch March 21, 2022 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kaltura Videos on Demo Page Won't Play or Seek
3 participants