Getting Started
In this page, we will install the MediaSpace CLI and generate basic module code.
Prerequisites
- A local KMS (Kaltura MediaSpace) installation.
- A local copy of the
mediaspace-react-componentsrepository. - Access to Kaltura’s
npmregistry (please contact your Kaltura representative).
Creating a new module from template
Install the KMS CLI
KMS CLI is a command line tool that allows you to run certain tasks from the command line instead of doing them manually or via KMS’ UI.
- Open the terminal.
- Navigate to
mediaspacedirectory. - Install Composer dependencies by running
composer install. - Run
chmod +x mediaspaceto make the binary file executable.
Create the module
From the mediaspace directory, run mediaspace make:module -c <module-name>, where <module-name> is the name of your module.
This will create a new directory in mediaspace/modulesCustom/core which includes the minimum code for a working module.
Create a design-system (DS) compatible component
In this section, we will install the React-Components CLI tool that will allow us to create a new React component that can be used in MediaSpace.
Install MediaSpace React-Components CLI tool
- Navigate to
mediaspace-react-componentdirectory. - If you’re using
nvm, or Node Version Manager (recommended), runnvm useto install the supported Node &npmversions. - Run
npm install -gto install the CLI tool globally, which will be accessible via themrc(short for MediaSpace React Components) command.
Generating a React application
- Navigate to your module’s *root directory.
- Run
mrc ps:project <module-name>. This command will create a directory calledappand will initialize a new project there.