Story block
Currently, there are four source types of video feed:
- Discover Feed
- Channel Feed
- Playlist Feed
- Dynamic Content
- Hashtag Playlist
Import and render
StoryBlock
.import {
StoryBlock,
} from 'react-native-firework-sdk';
// discover
<StoryBlock
style={{ height: 200 }}
source="discover"
/>
// channel
<StoryBlock
style={{ height: 200 }}
source="channel"
channel="your encoded channel id"
/>
// playlist
<StoryBlock
style={{ height: 200 }}
source="playlist"
playlist="your encoded playlist id"
channel="your encoded channel id"
/>
// dynamic content
<StoryBlock
style={{ height: 200 }}
source="dynamicContent"
channel="your encoded channel id"
dynamicContentParameters={{
'<cohort key>': ['<cohort value1>', '<cohort value2>'],
}}
/>
// hashtag playlist
<StoryBlock
style={{ height: 200 }}
source="channel"
channel="your encoded channel id"
hashtagFilterExpression="<hashtag filter expression>"
/>
Please refer to the Encoded IDs help article to learn about how to find your encoded channel ID, playlist ID.
StoryBlock
component provides onVideoFeedLoadFinished
prop for setting video feed loading result callback.<StoryBlock
style={{ height: 200 }}
source="discover"
onStoryBlockLoadFinished={(error) => {
/**
* if error is undefined, it means that story block loaded successfully.
* Otherwise, it means that story block failed to load.
*/
console.log('onStoryBlockLoadFinished error', error);
}}
/>
Last modified 30d ago