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

Support Kaltura's HTML5 player (v2) #1082

Merged
merged 10 commits into from
Feb 3, 2021
Merged

Conversation

jessp01
Copy link
Contributor

@jessp01 jessp01 commented Nov 18, 2020

This pull adds support for Kaltura player embeds (using an iframe tag).

Thanks in advance for your consideration,

@jessp01 jessp01 marked this pull request as draft November 19, 2020 11:46
@jessp01 jessp01 marked this pull request as ready for review December 10, 2020 04:37
@jessp01
Copy link
Contributor Author

jessp01 commented Dec 10, 2020

Hi @cookpete,

First of all, a very useful project, well done:)
Could you please review this pull request? It basically follows the same implementation as Streamable, using the Embed.ly playerjs lib.

Thanks,

@cookpete
Copy link
Owner

Hi @jessp01, sorry for how long it has taken to get back to you on this.

I'm running it locally and not much is working. Pause doesn't work, seeking doesn't work, volume change only works when you set it to 0, and none of the callback props are called (onPlay, onPause, etc).

The player API docs also don’t mention anything about supporting player.js: http://player.kaltura.com/docs/api

@jessp01
Copy link
Contributor Author

jessp01 commented Jan 13, 2021

Hi @cookpete,

Thanks for getting back to me. When you say you're running it locally, do you mean with the demo app (src/demo/App.js)?
It worked okay when I tested but I will check again. Also could you please let me know which API ops you consider mandatory, or, in other words: must be implemented before the pull can be merged?

As for the documentation, indeed, it is lacking in that sense. The Kaltura player supports multiple embed methods and has its own API but when embedding in an iframe (which seems to be the preferred method for react-player, quite sensibly), using Embed.ly's player.js is the only way.

Thanks again,

@jessp01
Copy link
Contributor Author

jessp01 commented Jan 17, 2021

Hi @cookpete ,

All basic APIs work now (tested using the demo app). If you feel it's important, I can implement the speed increase actions as well.

Let me know if this can be merged?

Cheers,

@cookpete
Copy link
Owner

I think something must be broken with their player API? Things still aren't working for me.

Even the most basic interactive embed code (copied directly from their docs) doesn’t seem to work:

http://player.kaltura.com/modules/PlayersJsReceiver/tests/PlayersJsReceiver.qunit.html

	var player = new playerjs.Player( document.getElementById('kaltura_player') );
	//listen to play start
	player.on(playerjs.Events.PLAY, function() {
	  // This is never called :(
		console.log('play');
	});

Live example: https://jsfiddle.net/zes7n2pw/

@cookpete
Copy link
Owner

There’s also this page that has a script tag that doesn't work:

https://developer.kaltura.com/player/web/getting-started-web

  <script type="text/javascript" src="https://cdnapisec.kaltura.com/p/000000/embedPlaykitJs/uiconf_id/22222222"></script>

I get a 404 when I try the example as well as replace the conf_id and partner id with the ones from your sample URL:

image

@jessp01
Copy link
Contributor Author

jessp01 commented Jan 18, 2021

Hi @cookpete ,

Yes, I am aware of the fact that this demo (http://player.kaltura.com/modules/PlayersJsReceiver/tests/PlayersJsReceiver.qunit.html) does not work. I will try to get that fixed (not under my direct remit but I'll speak to the relevant people).
But does the demo app (src/demo/App.js) not work for you following my last commit? It does for me.

Also, here's a standalone demo that works as well:
https://demo.kaltura.me/player.js.demo.html

The documentation you referenced (https://developer.kaltura.com/player/web/getting-started-web) pertains to Kaltura's player v7 (aka playKit). That's a completely different codebase I'm afraid (I agree it is confusing). I'll submit a pull to support that a bit later in the game, when it's a bit more mature.

Thanks again for your time,

@cookpete
Copy link
Owner

cookpete commented Feb 3, 2021

Added some tweaks and fixes, mainly around the onReady and event binding logic. Hopefully all good now. Thanks for the help @jessp01 👍

@cookpete cookpete merged commit 264cb10 into cookpete:master Feb 3, 2021
@jessp01
Copy link
Contributor Author

jessp01 commented Feb 4, 2021

Hi @cookpete,

Excellent. Thanks again for your time :)

@jessp01
Copy link
Contributor Author

jessp01 commented Feb 8, 2021

@cookpete - would it be possible for you to create a new release version?
Thanks,

@cookpete
Copy link
Owner

cookpete commented Feb 9, 2021

Would like to get some other stuff in first. Will publish soon 👍

@jessp01
Copy link
Contributor Author

jessp01 commented Feb 9, 2021

Cheers, @cookpete. Much appreciated.

Yasamato added a commit to Yasamato/react-player that referenced this pull request Apr 30, 2021
cookpete added a commit that referenced this pull request Feb 20, 2022
* Adjust listener for kaltura

Fixes #1202 and related to #1082.

* Fix lint

As mentioned in #1225 `findDOMNode` is deprecated.

* Add autoplay to iframe props

* Move code to load method and call it instead

* Update src/players/Kaltura.js

Co-authored-by: Pete Cook <pete@cookpete.com>

* Remove `this.load()` call in `componentDidMount`

Co-authored-by: Pete Cook <pete@cookpete.com>
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.

2 participants