Skip to main content
All CollectionsAdvanced Use-Cases
React.js integration guide
React.js integration guide

Implementing the Spotlightr Player in your react.js applications is pretty simple, the player itself is written in react, so it plays nicely

Updated over a week ago

Basic video player

If you simply want to serve Spotlightr videos in your React.js application you can use the default embed code and render it / style it as needed. The following jsfiddle provides the basic implementation example: https://jsfiddle.net/petarsubotic/ntae8ybd/


Interacting with the player (advanced)

If you want your React.js application to interact with the player, using the available methods and event listeners (playing, stopping, controls, changing source, getting information from the video etc.), then you will need to include the spotlightr.js SDK, and the implementation will be slightly different, you are welcome to review the following example: https://jsfiddle.net/petarsubotic/250eytan/

Additional use cases

You may want to include various Spotlightr modules, such as quizzes, playlists or galleries you may do so by reviewing the following examples:

Gallery: https://jsfiddle.net/petarsubotic/0warkonz/

Embed code parameters

In specific use cases you may want to utilize available configuration options for embed codes, such as custom start times, aspect ration etc. Here are a couple of examples of that

Did this answer your question?