time (number): The time that the jPlayer should start playing from, defaults to the current time.id (string): Id of the jPlayer to apply this to.This will be rarely used, if you are setting new media you don't need to use this function beforehand as setMedia already internally clears existing values before setting a new media. clearMedia(id)Ĭlear the media and reset all status values. media (object): The new media you want to set.value (any): The value to set the option to.key (string): The name of the option that you want to set.ShowRemainingDuration: ,Ĭonst Component = (>Įxport default connect(mapStateToProps)(Component) ActionsĪll of the actions need to be dispatched using Reduxes dispatch function as you normally do with actions.įor example, if you wanted to toggle the showRemainingDuration from somewhere in your application on a jPlayer called 'AudioPlayer': Must be passed to your store with the key named 'jPlayers'. The jPlayer reducer that will be called whenever a jPlayer function is dispatched. The result of this is used as the initial state for your jPlayer. Deep merges the options that you pass in with react-jPlayer's default options. Used for setting up the default options for your jPlayer. Documentation initializeOptions(jPlayerOptions) : Required Audio/Video events can be subscribed to by passing down the Media events to the Audio or Video component, E.g: console.log("started playing media")} />.Connect your jPlayer to the store using reduxes connect to get access to the jPlayer's state.¹partially tested without audio/video because browserstack emulators don't support it. I also haven't been able to find a browser that React supports that also didn't support Html5 video/audio players either which makes flash useless. No flash player support because flash is dead.No jQuery dependency that is in the standard jPlayer.
The development tester used to test the operation of different jPlayer methods. The supplied media formats are WebMv, OGV and M4V.ĭemo variants: jPlayer's Development Tester This demo will use the HTML solution if it can, otherwise the Flash fallback solution will be used. You can easily customise the way it looks and make it fit your pages colours and style. In this demo jPlayer is combined with HTML and CSS to create a video player. JPlayer 2.9.2 Demos jPlayer as a video player