Story Block layout
Similar to the Carousel layout, the Story Block layout displays videos horizontally, but only one video is visible at a time.
val cfBuilder = ViewConfig.Builder(this) // `this` is a context
cfBuilder.videoSource(source)
val storyBlockLoCf = ShortVideoStoryBlockLayout.createDefaultConfig(this)
cfBuilder.layoutConfig(storyBlockLoCf)
shortVideoView.init(cfBuilder.build())
You have the ability to disable scrolling and customize the next/previous buttons. Below are the attributes available for customization:
- Enable/Disable scrolling
- Container background color
- Item background color
- Previous button (set to null to hide)
- Next button (set to null to hide)
Story Block Item
For Story Block items, you can customize the following UI components/attributes:
- Video title text view (the layoutGravity attr is ignored)
- Item's corner radius
- Progress bar
- Play/pause, mute, full screen, share button
- Video thumbnail scale mode
- Video scale mode
- Product item view
Starting from LORA SDK 1.1.0, this layout type can display overlay data, including product lists, polls, and Q&A. For more information about overlay data, please refer to the Detail Player below.