This how-to guide describes how to update the library in your project once you have received a new version.
Typically, you receive a CDN url and a ZIP file, which look like this:
This means that there are two ways to include the library in your project: cloud hosted (CDN) or self hosted (ZIP file).
In the head
section of you project, include the library link like this:
<script type="text/javascript" src="https://cdn.theoplayer.com/dash/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/THEOplayer.js"></script>
// the default stylesheet of the player is hosted under the same folder, which you can include like this:
<link rel="stylesheet" type="text/css" href="https://cdn.theoplayer.com/dash/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/ui.css">
NOTE: The chromeless version of the player (THEOplayer.chromeless.js) is also available in the folder.
The next step is to update the libraryLocation to point to the parent folder of the library as you can see below:
libraryLocation: https://cdn.theoplayer.com/dash/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/
NOTE: this option is only available for enterprise customers. Pay-as-you-go customers are not allowed to self-host.
Alternatively, you could extract the included zip file and host the library yourself.
In this case, the steps are the same as above, but you would need to point to the path where you store the library instead of "https://cdn.theoplayer.com/dash ...".
When you extract the ZIP file, you will see the following 'helper files':
theoplayer.d.js
theoplayer.e.js
theoplayer.p.js
It is important these files are placed in the same directory as the core library (THEOplayer.js).
It is crucial to also update the libraryLocation as seen in the snippet above. Not doing will result in playback failure.
Typically, you receive a ZIP file, which look like this:
AndroidSDK-[version-number]-[your-android-license-key].zip
To access the documentation and be able to import the library, unzip the file.
Importing the THEOplayer Android SDK Library can be done following these steps:
Additionally, you can import the sources jar to be able to immediately see the API java source files with their documentation in Android Studio. Follow the following after successfully importing the library steps for that:
See this link to learn how to add a dependency to your Android project.
Typically, you receive a ZIP file, which look like this:
iOSSDK-[version-number]-[your-iOS-license-key].zip
To access the documentation and be able to import the library, unzip the file.
Steps for adding a framework:
Validate that the framework will correctly be added during builds