Flowplayer · Adverts for live stream

A pre-roll video ad, and an image text advert 30 seconds into a live stream.

<head/>

Include the ASF assets after loading all other Flowplayer assets:

<!-- Flowplayer -->
<script src="//releases.flowplayer.org/7.0.2/flowplayer.min.js"></script>
 
<!-- Flowplayer hlsjs plugin -->
<script src="//releases.flowplayer.org/hlsjs/flowplayer.hlsjs.min.js"></script>
 
<!-- Google IMA SDK -->
<script src="//s0.2mdn.net/instream/html5/ima3.js"></script>
<!-- Flowplayer ASF plugin -->
<script src="//releases.flowplayer.org/asf/flowplayer.org/2.1.3/asf.min.js"></script>

HTML

asf.min.js is the AdSense plugin for Flowplayer - you will get your own version of it when you sign up with our AdSense program. This plugin will be tied to your personal ad slot so that the ad impressions and clicks will be associated with your account, and the ad revenue will be assigned to you.

This page uses //releases.flowplayer.org/asf/flowplayer.org/2.1.3/asf.min.js which was built for the flowplayer.org domain and its subdomains. Make sure you are using the build we created for you, otherwise you will not see any revenues.

<style>

.flowplayer {
background-image: url(//flowplayer.org/media/img/logo-blue.png);
background-size: 95%;
background-color: #fff !important;
-webkit-box-shadow: 0 0 20px #b8b8b8;
-moz-box-shadow: 0 0 20px #b8b8b8;
box-shadow: 0 0 20px #b8b8b8;
}
 
.flowplayer.is-error .fp-message p {
font-size: 200%;
font-weight: bold;
color: #f00;
}

CSS

<script>

// global adsense setup and config for all player on page
flowplayer.conf.ima = {
 
// this should only be set when you are testing your installation
adtest: true,
 
// make the Google robots crawl the current page
description_url: location.href,
 
// request 2 adverts
ads: [{
time: 0,
ad_type: "video",
max_ad_duration: 40000
 
}, {
time: 30,
ad_type: "image_text",
overlay: "bottomThird"
 
}]
 
};
 

window.onload = function () {
var container = document.getElementById("player");
 
// install the player as usual
flowplayer(container, {
ratio: 9/16,
splash: true,
live: true,
clip: {
sources: [
{ type: "application/x-mpegurl",
src: "//nasatv-lh.akamaihd.net/i/NASA_101@319270/master.m3u8" }
]
}
 
});
 
};

JavaScript

<body/>

<div id="player" class="fp-full"></div>

HTML

AdSense for Flowplayer demos