Skip to content

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-components repository.
  • Access to Kaltura’s npm registry (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.

  1. Open the terminal.
  2. Navigate to mediaspace directory.
  3. Install Composer dependencies by running composer install.
  4. Run chmod +x mediaspace to 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

  1. Navigate to mediaspace-react-component directory.
  2. If you’re using nvm, or Node Version Manager (recommended), run nvm use to install the supported Node & npm versions.
  3. Run npm install -g to install the CLI tool globally, which will be accessible via the mrc (short for MediaSpace React Components) command.

Generating a React application

  1. Navigate to your module’s *root directory.
  2. Run mrc ps:project <module-name>. This command will create a directory called app and will initialize a new project there.