This guide explains how to set up THEOplayer in combination with FreeWheel, an advertisement vendor.
Web SDK | Android SDK | iOS SDK | tvOS SDK | Android TV SDK | Chromecast SDK |
---|---|---|---|---|---|
Yes | No | No | No | No | N/A |
There are prerequisites when using FreeWheel through THEOplayer.
freewheel
module when building your THEOplayer SDK through the THEOplayer Development Portal.FreeWheel SDK
, as explained further in this guide.This example explains how you do a basic implementation of FreeWheel in THEOplayer.
The FreeWheel integration is currently only available on the Web SDK.
After setting up your basic page containing THEOplayer, you need to add the FreeWheel MRM client SDK to the page:
<script type='text/javascript' src='https://mssl.fwmrm.net/libs/adm/6.xx.x/AdManager.js'></script>
Next, you add a FreeWheelAdDescription
to your source that specifies the FreeWheel tokens. An example sourceDescription could look like this:
...
<!-- make sure to link to a valid version number -->
<script type='text/javascript' src='https://mssl.fwmrm.net/libs/adm/6.xx.x/AdManager.js'></script>
...
player.source = {
sources : [{
src : 'your.m3u8',
type : 'application/x-mpegurl'
}],
ads: [{
integration: 'freewheel',
networkId: 96749,
assetId: 'DemoVideoGroup.01',
profile: 'global-js',
assetDuration: 22,
adServerUrl: 'https://demo.v.fwmrm.net/ad/g/1',
siteSectionId: 'DemoSiteGroup.01',
cuePoints: [{ adUnit: 'preroll' }]
}]
};
We configure cuePoints in this example. This is needed for some set-ups or completely optional for others. THEOplayer will create a FreeWheel temporalSlot behind the screens, which is a request to schedule an advertisement at said point. It is up to FreeWheel (and the campaign settings) to decide whether it will insert an advertisement at this requested time. Not all campaigns need it and for some campaigns the requested cuePoints might even be ignored by FreeWheel.
This API is currently not available on the Android (TV) SDK.
This API is currently not available on the iOS (/tvOS) SDK.
The following resources provide more information: