Server-Side Ad Insertion
Table of contents
Introduction
This plugin allows to play Server-Side Ad Insertion streams.
Installation
For the manual Javascript setup, include the plugin script next to the core player:
<script src="//cdn.flowplayer.com/releases/native/3/stable/flowplayer.min.js"></script>
<script src="//cdn.flowplayer.com/releases/native/3/stable/plugins/ssai.min.js"></script>
Player and plugins exist in different release versions. Please see the release channel documentation.
Configuration
The SSAI plugin is configured under the src
namespace.
DAI Configuration
-
- property
- description
-
- type
- 'google/dai' to indicate that a Google DAI stream is used
-
- src
- the DAI enabled stream
-
- contentSrcId
- the contentSourceID from IMA DAI SDK used to determine the content source of the stream
-
- videoId
- the videoId from IMA DAI SDK used to determine which specific video stream should be played
-
- assetKey
- the assetKey from IMA DAI SDK used to determine which live stream should be played
DAI VOD Sample code:
var player = flowplayer('#container',
{ src: [
{ contentSrcId : "123456"
, videoId : "test-video-id"
, type : "google/dai"
, src : "http://storage.googleapis.com/testtopbox-public/video_content/bbb/master.m3u8"
}] }
)
DAI Live Sample code:
var player = flowplayer('#container',
{ src: [
{ assetKey : "sN_IYUG8STe12345_ksA"
, type : "google/dai"
, src : "http://storage.googleapis.com/testtopbox-public/video_content/bbb/master.m3u8"
}] }
)
Yospace Configuration
-
- property
- description
-
- type
- 'yospace' to indicate that a Yospace stream is used
-
- src
- the Yospace stream
Yospace Sample code:
var player = flowplayer('#container',
{ src: [
{ type : "yospace"
, src : "https://csm-e-sdk-validation.bln1.yospace.com/csm/access/12345/c2FtcGxlL21hc3Rl?yo.av=3"
}
]}
)
API Events
SSAI related events can be found from flowplayer.ssai.events
and listened to using normal event listeners.
Available events:
-
event
- description
-
flowplayer.ssai.events.SSAI_AD_START
- Fired when an ad starts to show
-
flowplayer.ssai.events.SSAI_AD_END
- Fired when the current ad ends
-
flowplayer.ssai.events.SSAI_AD_PROGRESS
- Fired when the current ad progresses