This IRIS.TV Adaptive plugin documentation is specific for THEOplayer v2
Prerequirements
There are two prerequirements in order to continue with this guide:
- 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.
- You have some basic knowledge on how to use THEOplayer 2.X.
Integration with Iris.TV
Set-up a working THEOplayer
This won't be covered in this guide. You can read on this subject at the getting started pages.
Include the IRIS.TV Plugin
You need to include the JS script tag referencing the IRIS.TV Plugin. 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>
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='https://cdn.theoplayer.com/demos/iristv/THEOplayer.iristv.js'> </script>
You can also add extra styling on top of the IRIS.TV UI:
<link rel='stylesheet' type='text/css' href='https://cdn.theoplayer.com/demos/iristv/THEOplayer.iristv.css'> </link>
Initialize THEOplayer-IrisTV
To start displaying the IRIS.TV UI, you have to call THEOplayerIrisTv() (from THEOplayer.iristv.js), and pass along the THEOplayer instance and your IRIS.TV configuration. For example:
<script> ... var player = new THEOplayer.Player(videoContainer, {libraryLocation: 'https://cdn.theoplayer.com/dash/theoplayer/'}); var irisOptions = { client_token: "51afa098ah", platform_id: "5798d994ef995e0d18000176" }; THEOplayerIrisTv(player, irisOptions); player.src = "mystream.m3u8"; </script>