jplayer / react-jPlayer

Html5 audio and video player library for React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For standalone html website

prog20901 opened this issue · comments

Hi,

We have a standalone html web-site not dynamic.

Do we need a node js server to run the react jplayer? Can i just add react js libraries and add the player to the HTML to embed the audio player?

If yes, can u add couple of html files to explore it

Thanks.

@JKathir You don't need a node server, this is a front-end package not a back-end. You could just add the scripts in your html but you will still need to add custom javascript and connect it with Redux like in the examples. I will add an example to react-jplayer examples.

yes, please kindly add a standalone version of examples and it would be useful

@JKathir Added a UMDPlayer example. Basically you just include the dependncies that react-jPlayer depends on in the index.html file as shown in the example and then you include the react-jPlayer files from the /dist/ folder. You can just copy them to your project if you don't want to use npm and node_modules.

As you can see you still need to define the players in javascript. That's just how this works with React. If you want a static HTML with normal js then look at the normal jPlayer. This package is for ReactJS projects.

Any problems just tell me.

Thanks.

Ah, OK, I guess that answers the question I was about to post, which was:
Is this the "new" version of jPlayer? With jPlayer development seemingly stopped in 2014, I was looking to "move on up" to resolve issues like https://developers.google.com/web/updates/2017/06/play-request-was-interrupted

The other alternative I suppose is AblePlayer? Just really looking for something simple which can be keyboard driven as jPlayer can.

@digitaltoast It's a completely new code base built in react for react only. It really doesn't have much remaining code from the original jPlayer but was inspired by it. You can think of this as a 'newer' version of jPlayer.

This player can be key driven.

Basically if you are using React then a react player like this package makes sense. If you are not using react then do not use this package.