React Video Gallery is a Jahia V8.2 module that provides full React-based front-end rendering with GraphQL-powered data fetching. It supports multiple video providers, including YouTube, Vimeo, Wistia, Storylane, and internal Jahia video sources.
This module integrates directly into Jahia Edit Mode, allowing content editors to update video configurations dynamically within the CMS.
- Installation
- Building the Module
- Deploying to Jahia
- Usage
- Features
- Jahia Integration
- Dependencies
- Configuration
- GraphQL Queries
- Examples
- Troubleshooting
- Contributors
- License
To set up the module in a Jahia V8.2 environment, follow these steps:
-
Ensure Jahia V8.2 is installed and running.
-
Clone the repository:
git clone https://github.com/your-repo/react-video-gallery cd react-video-gallery
-
Install dependencies:
npm install
The module needs to be compiled and packaged into a .jar
file before deployment.
-
Ensure you have Apache Maven installed.
-
Run the following command from the project root:
mvn clean install
-
This will generate a
.jar
file in thetarget/
directory.
After building the module, follow these steps to deploy it to Jahia:
- Open Jahia Module Manager.
- Upload the generated JAR file from
target/
. - Start the module inside Jahia.
- Enable the module on your Jahia site.
Once deployed, you can start adding and configuring video components in Jahia.
After enabling the module, you can add the React Video Gallery component within a content folder, and start adding external and internal video to your gallery. You can then create a content reference to the gallery to be displayed within a page.
import React from 'react';
import ReactVideoGallery from './ReactVideoGallery';
const VideoGalleryPage = () => {
return (
<div>
<h1>My Video Gallery</h1>
<ReactVideoGallery />
</div>
);
};
export default VideoGalleryPage;
This component handles embedding videos from multiple platforms.
import VideoService from './VideoService';
<VideoService
open={true}
handleClose={() => console.log('Closed')}
videoTitle="Sample Video"
videoService="youtube"
videoId="abc123"
/>
✅ Fully compatible with Jahia V8.2
✅ Supports YouTube, Vimeo, Wistia, Storylane, and internal Jahia video sources
✅ Uses GraphQL (Apollo Client) for dynamic content fetching
✅ Seamless integration with Jahia Edit Mode
✅ Fully responsive UI with Material UI
✅ React Player for embedded video rendering
This module is designed specifically for Jahia Digital Experience Platform (DXP) V8.2, offering seamless integration with Jahia’s content repository.
- Supports Jahia Edit Mode for inline content editing.
- Uses GraphQL (Apollo Client) to fetch video data from Jahia’s JCR (Java Content Repository).
- Dynamically configurable using Jahia node properties.
Property Name | Type | Description |
---|---|---|
videoService |
String | Defines the video provider (YouTube, Vimeo, Wistia, etc.) |
videoId |
String | The unique video ID for external providers |
videoUrl |
String | URL for internally hosted videos |
videoDesc |
String | A brief description of the video |
videoPoster |
Image | Thumbnail image for the video |
To install required dependencies, run:
npm install @mui/material react-player @apollo/client i18next
This module relies on:
- Jahia V8.2
- React
- @mui/material (for UI components)
- React Player (for embedded video playback)
- Apollo Client (for GraphQL queries)
- i18next (for translations)
The component supports multiple video providers. Set the videoService
property accordingly:
Platform | videoService Value |
Additional Props |
---|---|---|
YouTube | "youtube" |
videoId |
Vimeo | "vimeo" |
videoId |
Wistia | "wistia" |
videoId |
Storylane | "storylane" |
videoId |
Internal | "internal" |
videoUrl |
The module fetches video data using Apollo Client and Jahia’s GraphQL API.
query getReactVideoGalleryData($workspace: Workspace!, $id: String!, $language: String!) {
response: jcr(workspace: $workspace) {
workspace
Gallery: nodeById(uuid: $id) {
title: displayName(language: $language)
children {
nodes {
...InternalVideoFields
...ExternalVideoFields
}
}
}
}
}
- Internal Videos are stored within Jahia and referenced via
videoUrl
. - External Videos are embedded from platforms such as YouTube, Vimeo, and Wistia.
- Stephane Monier - Initial Development
This project is MIT Licensed. See LICENSE
for details.