Configure Video Advertisements
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?