Schedule FreeWheel ads
Add advertising breaks to your content when using the FreeWheel Ad Manager ad client.
If you have an existing relationship with FreeWheel, you can configure JW Player's FreeWheel plugin to gain access to their video ad inventory. Be sure you have all the required items in the Requirements section.
Requirements
- JW Player advertising requirements
- All FreeWheel account information listed in the following table
Property | Description | Example |
---|---|---|
adManagerURL | URL of the FreeWheel Ad Manager | https://mssl.fwmrm.net/libs/adm/6.24.0/AdManager.js |
fwassetid | FreeWheel identifier of a particular media item | DemoVideoGroup.01 |
networkid | FreeWheel identifier of a network | 96749 |
profileid | FreeWheel identifier of a particular application environment | global-js |
sectionid | FreeWheel identifier of a location where the video content plays | DemoSiteGroup.01 |
serverid | URL of FreeWheel ad server | http://demo.v.fwmrm.net/ad/g/1 |
If you do not know where to find the FreeWheel account values in the table, contact your FreeWheel account representative.
Add a single ad break for all playlist items
Use the following steps and code samples to add a pre-roll ad to an embedded player.
- Within
setup()
of an embedded JW Player web player, define thefwassetid
property as the name of your FreeWheel asset id. - Add an advertising object.
- Define the
client
property within theadvertising
object asfreewheel
. - Add a
freewheel
object within theadvertising
object. Define thenetworkid
,serverid
,profileid
,sectionid
, andadManagerURL
properties with your FreeWheel account settings. - (Optional) If you have custom key-value pairs that you want to send with your ad call, add a
custom
object and define each key-value pair. - Define the
adscheduleid
property within theadvertising
object. Assign a randomly-generated, eight character, alpha-numeric value to this property. This allows you to analyze performance data by ad schedule. - Add a schedule array within the
advertising
object. Assignfw-preroll
to the tag property. This creates an ad tag placeholder.
TIP
As a shortcut, you can define
advertising.tag
(String) to create a single pre-roll ad break. If you use this shortcut, you cannot add multiple ad breaks.
Theadvertising.tag
property andadvertising.schedule[]
property cannot be used in the sameadvertising
object.
jwplayer("myElement").setup({
"playlist": "https://cdn.jwplayer.com/v2/playlists/{playlist_id}",
"fwassetid": "freewheel_asset_id",
"advertising": {
"client": "freewheel",
"freewheel": {
"networkid": {freewheel_network_id},
"serverid": "{freewheel_server_id}",
"profileid": "{freewheel_profile_id}",
"sectionid": "{freewheel_section_id}",
"adManagerURL": "{freewheel_ad_manager_url}",
"custom": {
"key1": "val1",
"key2": "val2"
}
},
"adscheduleid": "Az87bY12",
"schedule": [
{
"tag": "fw-preroll"
}
]
}
});
You can build upon this basic implementation by adding multiple ad breaks or defining ad rules. Currently, Player Bidding cannot be configured when using FreeWheel.
Add multiple ad breaks for all playlist items
Use the following steps to add multiple ad breaks to the previous FreeWheel pre-roll example:
- In the existing
advertising.schedule
index, define theoffset
property aspre
. When setting multiple ad breaks, each index must have an explicitly definedoffset
. - Define an additional index within the
advertising.schedule
array. - Assign a placeholder to the
tag
property. Each ad break should have a different placeholder name (fw-midroll1
,fw-midroll2
,fw-postroll
). - When defining the
offset
property, choose one of the following values to schedule a mid-roll ad. Post-roll ads are not currently supported for FreeWheel ad implementations.
Mid-roll
- {number}: (String) Ad plays after the specified number of seconds.
- {timecode}: (String) Ad plays at a specific time, inhh:mm:ss:mmm
format.
jwplayer("myElement").setup({
"playlist": "https://cdn.jwplayer.com/v2/playlists/{playlist_id}",
"fwassetid": "{freewheel_asset_id}",
"advertising": {
"client": "freewheel",
"freewheel": {
"networkid": {freewheel_network_id},
"serverid": "{freewheel_server_id}",
"profileid": "{freewheel_profile_id}",
"sectionid": "{freewheel_section_id}",
"adManagerURL": "{freewheel_ad_manager_url}",
"custom": {
"key1": "val1",
"key2": "val2"
}
},
"adscheduleid": "Az87bY12",
"schedule": [
{
"offset": "pre",
"tag": "fw-preroll"
},
{
"offset": 10,
"tag": "fw-midroll1"
},
{
"offset": "00:00:15:000",
"tag": "fw-midroll2"
},
{
"offset": "25%",
"tag": "fw-midroll3"
}
]
}
});
You can build upon this implementation by defining ad rules. Currently, Player Bidding cannot be configured when using FreeWheel.
Specify ad content for a specific playlist item
Use the following steps to specify advertising content for a specific playlist item. If you do not apply these steps to a playlist item, the default FreeWheel advertising content will play.
IMPORTANT
To configure advertising for a specific playlist item, the
playlist
object must be organized as an array of objects.
- For a specific array item within the
playlist
array, define thefwassetid
property as the name of the FreeWheel asset id you want to use for this specific array item. - Add a
freewheel
object within the array item. Define thenetworkid
,serverid
,profileid
, andsectionid
properties with the FreeWheel account settings for the FreeWheel asset. - (Optional) If you have custom key-value pairs that you want to send with your ad call, add a
custom
object and define each key-value pair.
In the following example, {media_id1}
will play {freewheel_asset_id1}
. And, {media_id2}
will play {freewheel_asset_id_default}
.
jwplayer("myElement").setup({
"playlist": [
{
"file": "https://cdn.jwplayer.com/v2/media/{media_id1}",
"fwassetid": "{freewheel_asset_id1}",
"freewheel": {
"networkid": {freewheel_network_id},
"serverid": "{freewheel_server_id}",
"profileid": "{freewheel_profile_id}",
"sectionid": "{freewheel_section_id}",
"custom": {
"key3": "val3",
"key4": "val4"
}
}
},
{
"file": "https://cdn.jwplayer.com/v2/media/{media_id2}"
}
]
"fwassetid": "{freewheel_asset_id_default}",
"advertising": {
"client": "freewheel",
"freewheel": {
"networkid": {freewheel_network_id},
"serverid": "{freewheel_server_id}",
"profileid": "{freewheel_profile_id}",
"sectionid": "{freewheel_section_id}",
"adManagerURL": "{freewheel_ad_manager_url}",
"custom": {
"key1": "val1",
"key2": "val2"
}
},
"adscheduleid": "Az87bY12",
"schedule": [
{
"offset": "pre",
"tag": "fw-preroll"
},
{
"offset": 10,
"tag": "fw-midroll1"
},
{
"offset": "00:00:15:000",
"tag": "fw-midroll2"
},
{
"offset": "25%",
"tag": "fw-midroll3"
}
]
}
});
Updated about 1 year ago