Skip to content

Adjust listener for kaltura#1226

Merged
cookpete merged 6 commits into
cookpete:masterfrom
Yasamato:fix-kaltura
Feb 20, 2022
Merged

Adjust listener for kaltura#1226
cookpete merged 6 commits into
cookpete:masterfrom
Yasamato:fix-kaltura

Conversation

@Yasamato

@Yasamato Yasamato commented Apr 30, 2021

Copy link
Copy Markdown
Contributor

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

kangaree commented May 2, 2021

Copy link
Copy Markdown

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

kangaree commented May 2, 2021

Copy link
Copy Markdown

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

Comment thread src/players/Kaltura.js Outdated
Comment on lines +38 to +40
load (url) {
// wait what?
}

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread src/players/Kaltura.js Outdated
Comment thread src/players/Kaltura.js Outdated
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
Copy Markdown
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