Storyblock
Displaying a Story Block can be done by using a StoryBlockViewController
either programmatically or in a storyboard.
Programmatic
Import FireworkVideo
Create a new
StoryBlockViewController
Embed the instantiated
StoryBlockViewController
Story Block Content Source
The enum StoryBlockContentSource
defines the different sources that can be used to populate the story block. The content source must be specified when the StoryBlockViewController
is instantiated; StoryBlockViewController(source: .discover)
. By default, the feed will use the .discover
content source.
Other content sources include
Channel
Displays content from the specified channel id.
Note: The user will only see videos they have not viewed before. If the user has viewed all the videos for a channel similar videos will automatically be provided.
Channel Playlist
Displays content from the specified playlist id.
Note: Unlike the channel content source, only content in the playlist will be shown to the user.
Dynamic Content
Displays dynamic content based on the provided channel id and content parameters.
Hashtag Playlist
Displays content based on the provided channel id and the hashtag expression.
Or a more advanced hashtag expression can be used to fine tune the results
Single Video or Live Stream
Displays a single video or live stream content.
Story Block Configuration
StoryBlockViewController
provides a StoryBlockConfiguration
API to configure the UI elements of the video player. A story block's video player can be configured differently when displaying in embedded mode or when expanded to full screen. Configurations for embedded mode are automatically propagated to their full screen counterparts. Please refer to API documentation for more details.
Last updated