Design
This page describes the Satellite/IPTV architecture used for set-top box (STB)-based broadcast services where ads are inserted into satellite (DTH) or IPTV multicast streams. It involves an ad agent process that runs alongside the TV app on the device.
Project Settings
build.gradle
SDK Initialization and Release
To use the SDK, you must call the SDK initialization function at the same time the TV app starts.
Built-in Ad Player
This section describes the SDK's built-in ad player when using the sdk-multicast-exoplayer submodule.
Adding an Ad Layer
As described in Design (View Layer Arrangement), add tv.anypoint.api.ads.AnypointAdView between the real-time broadcast layer and the TV UI layer.
Receiving Ad Events
The SDK receives ad events from the ad agent and passes them to the AdsManagerListener.
Receiving Submodule Lifecycle Events
If you need to receive events based on the lifecycle of each submodule, you can implement SdkModuleLifecycleListener. The available submodules are as follows:
Passing TV Events
In order for the SDK to respond appropriately to the current state of the TV app, the TV app must inform the SDK whenever its state changes. This includes events such as changing channels or exiting the app, which allows the SDK to respond appropriately.
Custom Ad Player
While the easiest way to integrate the SDK and manage ads is to delegate all control to the SDK, this section explains how to control ad playback using your TV app's existing video player.
Custom Ad Player Examples
While we generally don't recommend implementing your own custom ad player or AnypointAdPlayer class, this approach may be necessary in certain situations. For example, you might need a custom player if your TV app already has a built-in video player, if you need to optimize for specific hardware limitations, or if you want to create a unique user experience.
Using the SCTE-35 Decoder
If SCTE-35 packets are inserted into a linear channel stream, you can register and use the built-in decoder that parses those packets.
How to Test
To ensure the successful implementation of the ad operation feature within your TV app and confirm the successful playback of ad video files using the SDK, testing is required.
Release Notes
2 items