Iris.TV is a recommendation engine. When hooking THEOplayer to the IrisTV SDK, a UI will be overlaid over the default player UI which can be used to navigate through recommendations.
This guide describes how to do a custom IrisTV integration in THEOplayer.
Web SDK | Android SDK | iOS SDK | tvOS SDK | Android TV SDK | Chromecast SDK |
---|---|---|---|---|---|
Yes | Unverified through CSS/JavaScript injection | Unverified through CSS/JavaScript injection | No | Unverified through CSS/JavaScript injection | N/A |
There are two prerequisites in order to continue with this guide:
Getting started on Android Legacy (4.12.x)
This will not be covered in this guide. You can read on this subject at the getting started pages linked, per SDK, in the prerequisites section.
You need to include the JavaScript (JS) script tag referencing the IrisTV SDK. You could do this right before where you include the THEOplayer.js library.
<script type='text/javascript'
src='https://ovp.iris.tv/libs/adaptive/iris.adaptive.js'>
</script>
You need to include the IrisTV JavaScript library. To do so in your Android project:
You need to include the IrisTV JS library. To do so in your iOS project:
You need to include the JS script tag referencing the file containing the custom integration code. You could do this right after where you include the THEOplayer.js library.
<script type='text/javascript'
src='https://cdn.theoplayer.com/demos/iristv/THEOplayer.iristv.js'>
</script>
You can also add extra styling on top of the IrisTV UI:
<link rel='stylesheet' type='text/css'
href='https://cdn.theoplayer.com/demos/iristv/THEOplayer.iristv.css'>
</link>
You need to include the custom integration code. To do so in your Android project:
You need to include the custom integration code. To do so in your iOS project:
To start displaying the IrisTV UI, you have to call THEOplayerIrisTv() (from THEOplayer.iristv.js), and pass along the THEOplayer instance and your IrisTV configuration. For example:
<script>
...
var irisOptions = {
client_token: "51afa098ah",
platform_id: "5798d994ef995e0d18000176"
};
THEOplayerIrisTv(player, irisOptions);
</script>
The Web SDK code should be included in your Android (TV) project. The article at How to add CSS or JavaScript files to an Android/iOS project explains how you can add CSS and JS files to your project. The sample project at How to insert a button demonstrates this.
The Web SDK code should be included in your iOS project. The article at How to add CSS or JavaScript files to an Android/iOS project explains how you can add CSS and JS files to your project. The sample project at How to insert a button demonstrates this.
In summary, to integrate IrisTV in THEOplayer, you have to include their SDK and some custom code.
A live demo can be viewed at https://cdn.theoplayer.com/demos/iristv/iristv.html.