Documentation

TypeScript Support

How to use Radiant Media Player in a TypeScript project?

It is possible to use Radiant Media Player in a TypeScript project out of the box.

First download Radiant Media Player self-hosted package. Active customers can download the self-hosted package in our back-end. You may also retrieve player types files from our cloud player as shown below.

In the dist/ folder are types files:

  • rmp.min.d.mts that is used to define types for rmp.min.mjs file
  • rmp.min.d.ts that is used to define types for rmp.min.js file
  • rmp.debug.d.mts that is used to define types for rmp.debug.mjs file
  • rmp.debug.d.ts that is used to define types for rmp.debug.js file
  • rmp-hlsjs.min.d.ts that is used to define types for rmp-hlsjs.min.js file
  • rmp-shaka.min.d.ts that is used to define types for rmp-shaka.min.js file
  • rmp-three.min.d.ts that is used to define types for rmp-three.min.js file
  • rmp-vast.min.d.ts that is used to define types for rmp-vast.min.js file
  • rmp-vttjs.min.d.ts that is used to define types for rmp-vttjs.min.js file

Note that when adding player types to a TypeScript project you must only include one types file or you may see an error like:

Error: radiantmediaplayer/dist/rmp-hlsjs.min.d.ts:7:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: RadiantMP, Utils, ReadyManagement, SizeManagement ...

Your TypeScript project should automatically recognized the required types file but you can also manually add *.d.ts files to your types folder in your TypeScript project.

Player types files can also be fetched from our cloud-player:

The player types files are generated from JavaScript using JSDoc syntax.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.

©2015-2025 Radiant Media Player. All Rights Reserved.