How to integrate Iris.TV in THEOplayer

Introduction

Iris.TV is a recommendation engine. When hooking THEOplayer to the Iris.TV SDK, a UI will be overlayed over the default player UI which can be used to navigate through recommendations.

This guide describes how to do a custom Iris.TV integration in THEOplayer. This custom integration is compatible with both THEOplayer 1.X and 2.X.

1. Prerequirements

There are two prerequirements in order to continue with this guide:

  1. You have a THEOplayer 2.X license and library. If you don't have THEOplayer 2.X yet, you can start your free trial here or contact your THEOplayer account manager.
  2. You have some basic knowledge on how to use THEOplayer 2.X.

2. Integration with Iris.TV

2.1. Set-up a working THEOplayer

This won't be covered in this guide. You can read on this subject at the getting started pages.

2.2. Include the Iris.TV SDK

You need to include the JS script tag referencing the Iris.TV 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>

2.3. Include the custom integration

You need to include the JS script tag referencing the 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='http://cdn.theoplayer.com/theoplayer.iristv.js'>
</script>

2.4. Initialize THEOplayer-IrisTV

To start displaying the IrisTV UI, you have to call theoplayerIrisTv() from theoplayer.iristv.js. For example:

<script>
... var player = new THEOplayer.Player(videoContainer, {libraryLocation: 'https://cdn.theoplayer.com/dash/theoplayer/'}); theoplayerIrisTv(player); player.src = "mystream.m3u8";
</script>

3. Conclusion

In summary, to integrate IrisTV in THEOplayer, you have to include their SDK and some custom code. That's it.