StreamLayer Integration
What you learn​
This article is intended for Android developers integrating DIVA Player with the Deltatre video workflow. By the end of this article, DIVA Player will display StreamLayer advertisement overlays (such as pause ads) alongside your video on Android (Tablet only) and AndroidTV, sourced from per-video VAST URLs.
StreamLayer is a third-party interactive overlay SDK that displays contextual advertisements and interactive content alongside video playback. When integrated with DIVA Player, StreamLayer renders pause ads (for example, when the viewer pauses the video), using a per-video VAST URL to source ad creatives.
Before starting​
- Your video setup is working and you have a
<video id>and basic configuration for your platform. - You have a StreamLayer SDK key. Contact your StreamLayer account manager to obtain one.
- For each video, you have a StreamLayer event ID and a VAST URL. Obtain these values from your video engineering team.
Step 1 — Configure settings.streamLayerSetting​
Configure settings.streamLayerSetting in your player configuration to provide the SDK key required to activate StreamLayer.
See settings.streamLayerSetting for the complete setting schema and defaults.
Step 2 — Add streamLayer in videoMetadataProvider​
In your videoMetadataProvider, add the streamLayer field in VideoMetadata.
See VideoMetadata.streamLayer for the full metadata definition.
Instantiation​
There's no code to add to the Basic instantiation code.
Reference​
See StreamLayer References for the complete API surface, including:
- Player configuration and metadata fields —
streamLayerSettingandstreamLayervalues used by the built-in StreamLayer integration.