Learn to install FastPix video player and SDKs into your applications
This guide outlines how to set up FastPix Player, with the JavaScript SDK that integrates seamless video playback into your development projects. Choose between two installation methods — NPM (Node Package Manager) for package-based installations or CDN (Content Delivery Network) for quicker embedding in web applications.
You can also use the GitHub repository for FastPix web player.
It contains the source code, documentation, and examples to help you get started with integrating FastPix Player into your projects. Whether you’re a developer looking to customize the player or simply want to understand how it works, the repository is a valuable resource for all things related to FastPix web player.
Ideal for complex applications with multiple dependencies. NPM offers version control and automatic updates. This method requires a setup process, but it provides greater control over your project’s dependencies.
Perfect for quick integration and faster loading times. CDN is suitable for simpler applications but offers less control over versioning and updates.
If you choose to install FastPix Player via NPM, you need Node.js installed on your system. Node.js allows you to manage project dependencies through the command line.
To install Node.js:
You will need a command line or terminal to interact with Node.js (if using NPM) or to navigate through your project’s file structure. Most operating systems include a built-in command line or terminal application. If you need assistance accessing it, a quick web search can provide guidance.
Use the following script tag for fastpix-player:
You can replace @latest with the specific version you wish to use.
Add the CDN script link to your HTML file’s <head> section:
With the CDN link in place, whenever a web page loads, fastpix-player will be loaded automatically and ready to use, enabling seamless video playback.
PLEASE NOTE
Replace
{PLAYBACK_ID}with the mediaplaybackIdthat you received from the API response or from your dashboard after uploading your media.
Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux).
Navigate to your project’s root directory:
cd path/to/your/project
Initialize your project (if not already set up) with NPM:
npm init
To install the player, use the command below. If you want to use any particular version of the player, you can do so by adding @fastpix-player-version in the command and substituting <fastpix-player-version> with the desired version number (available versions are listed on the official NPM documentation):
This command will add @fastpix/fp-player and its dependencies to your project (package.json).
Once the installation is complete, @fastpix/fp-player will be located in the node_modules directory of your project. This confirms a successful installation.
In your JavaScript file, import the player using the following syntax:
Example:
PLEASE NOTE
Replace
{PLAYBACK_ID}with the mediaplaybackIdthat you received from the API response or from your dashboard after uploading your media.
By following these steps, you would have successfully installed fastpix-player using either NPM or CDN. Whether you chose the flexibility of NPM or the speed of CDN, you are now ready to integrate high-quality video playback into your project.