THEOplayer
THEOplayer is the universal video player solution created by THEO Technologies. It enables you to quickly deliver cross-platform content playback.
Prerequisites
- A valid THEOplayer license. Request yours via our THEOportal.
Included features
The THEOplayer SDK consists of modular features. This package includes the following features: dash
, ui
, texttrackstyle-ui
, webaudio
, chromecast
, airplay
If you need a different set of features, you can install a different variant of this package:
(You should only install one of the above-mentioned variants at a time.)
Installation
Install using your favorite package manager for Node (such as npm
or yarn
):
npm install @theoplayer/basic-dash
You can also install a specific version instead:
npm install @theoplayer/basic-dash@6.0.0
Note that versions earlier than 2.82.0 are not available on the public npm registry.
Earlier versions are available through our THEOportal.
Usage
Add the THEOplayer library to your JavaScript web app:
const THEOplayer = require('@theoplayer/basic-dash');
Depending on your choice of module loader, transpiler or bundler, you may need to use an import
instead:
import * as THEOplayer from '@theoplayer/basic-dash';
import * as THEOplayer from '@theoplayer/basic-dash/chromeless';
Add the CSS stylesheet for the THEOplayer UI to your HTML page:
<link rel="stylesheet" href="/url/to/node_modules/@theoplayer/basic-dash/ui.css" />
Next, create an HTML element that will contain the player:
<div id="theoplayer-container" class="video-js theoplayer-skin"></div>
Finally, create a player instance using the THEOplayer.Player constructor.
Pass it the created HTML element and a configuration object.
The configuration object must contain a valid license obtained from THEOportal. See our how-to guides for more information.
let element = document.querySelector('#theoplayer-container');
let configuration = {
license: 'your_theoplayer_license',
libraryLocation: '/url/to/node_modules/@theoplayer/basic-dash/'
};
let player = new THEOplayer.Player(element, configuration);
That's it! You should now have a working player on your web page.
You can control this player through its UI, or through the player
variable's JavaScript API.
Documentation
The documentation for THEOplayer is located on our documentation website.
For an example on how to setup THEOplayer, take a look at our Getting started guide.
Support
If you are having issues installing or using the package, first look for existing answers on our documentation website,
and in particular our FAQ.
You can also contact our technical support team by following the instructions on our support page.
Note that your level of support depends on your selected support plan.
License
The contents of this package are subject to the THEOplayer license.