Flowplayer · VAST plugin

< >

1. DFP trueview pre-roll, DFP overlay 10 seconds in

2. DFP AdRules trial

VAST compatible advertising with Flowplayer

The Flowplayer VAST plugin is a commercial video advert solution available on a subscription basis.

Check out the plugin page.

<head/>

Load your VAST plugin assets after the other Flowplayer assets in the HEAD section of the page:

<script src="//releases.flowplayer.org/7.0.4/flowplayer.min.js"></script>
<!-- optional for this demo: Flowplayer hlsjs engine -->
<script src="//releases.flowplayer.org/hlsjs/flowplayer.hlsjs.min.js"></script>
 
<!-- load VAST assets after Flowplayer assets -->
<!-- IMA sdk -->
<script src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
<!-- Flowplayer vast plugin -->
<script src="//releases.flowplayer.org/vast/flowplayer.org/vast.min.js"></script>

HTML

For your rented VAST plugin change the above locations to the ones you received with your subscription confirmation.

<style>

.flowplayer {
background-image: url(//flowplayer.org/media/img/logo-blue.png);
background-size: 95%;
background-color: #6496ff;
-webkit-box-shadow: 0 0 20px #b8b8b8;
-moz-box-shadow: 0 0 20px #b8b8b8;
box-shadow: 0 0 20px #b8b8b8;
}

CSS

<script>

window.onload = function () {
 
flowplayer("#vast", {
splash: true,
ratio: 9/16,
customPlaylist: true,
 
playlist: [{
// interactive media ads 1st clip config
ima: {
ads: [{
time: 0,
adTag: "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/48717572/fp-preroll-skippable&ciu_szs&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&description_url=https%3A%2F%2Fflowplayer.org&correlator=[timestamp]"
}, {
time: 10,
adTag: "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/48717572/fp-overlay&ciu_szs&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&description_url=https%3A%2F%2Fflowplayer.org&correlator=[timestamp]"
}],
 
},
 
sources: [
{ type: "application/x-mpegurl", src: "//edge.flowplayer.org/drive.m3u8" },
{ type: "video/mp4", src: "//edge.flowplayer.org/drive.mp4" }
]
 
}, {
// interactive media ads 2nd clip config
ima: {
adRules: "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator="
},
 
sources: [
{ type: "application/x-mpegurl", src: "//edge.flowplayer.org/FlowplayerHTML5forWordPress.m3u8" },
{ type: "video/mp4", src: "//edge.flowplayer.org/FlowplayerHTML5forWordPress.mp4" }
]
}]
});
 
};

JavaScript

<body/>

<div id="vast">
<a class="fp-prev" title="previous">&lt;</a>
<a class="fp-next" title="next">&gt;</a>
</div>
 
<div class="info">
<p>1. DFP trueview pre-roll, DFP overlay 10 seconds in</p>
 
<p>2. DFP AdRules trial</p>
</div>

HTML