Configure Video Advertisements Source (Android)
If you're working with another partner who handles the setup and management of your video campaigns, Firework can support displaying those ads and configuring them as well. Our SDK will retrieve the ad videos from your partner and display them in the channel.
Example code snippet for Video Ads Feed and StoryBlock
val channelId = "Encoded channel id"
val vastXML = "Vast XML"
val viewOptionsForStoryBlock = viewOptions {
baseOptions {
feedResource(FeedResource.VideoADs(channelId, vastXML))
}
storyBlockOptions {
showFullScreenIcon(true)
enableAutoPlay(true)
}
playerOptions {
showCaption(true)
showPlayPauseButtonInVideo(true)
}
adBadgeOptions{
adBadgeIsHidden(false)
}
}
val storyBlock = findViewById<FwStoryBlockView> (R.id.storyblock)
storyBlock.init(
fragmentManager = supportFragmentManager,
lifecycle = lifecycle,
viewOptions = viewOptions,
pauseWhenNotVisible = true,
)
Last updated
Was this helpful?