Video Feed (React Native)
Currently, there are five source types of video feed:
Discover
Channel
Playlist
Playlist Group
Dynamic Content
Hashtag Playlist
SKU
Single Content
Integration
import {
VideoFeed,
} from 'react-native-firework-sdk';
// discover
<VideoFeed
style={{ height: 200 }}
source="discover"
/>
// channel
<VideoFeed
style={{ height: 200 }}
source="channel"
mode="row"
channel="your encoded channel id"
/>
// playlist
<VideoFeed
style={{ height: 200 }}
source="playlist"
mode="row"
playlist="your encoded playlist id"
channel="your encoded channel id"
/>
// playlist group
<VideoFeed
style={{ height: 200 }}
source="playlistGroup"
mode="row"
playlistGroup="your encoded playlist group id"
/>
// dynamic content
<VideoFeed
style={{ height: 200 }}
source="dynamicContent"
mode="row"
channel="your encoded channel id"
dynamicContentParameters={{
'<cohort key>': ['<cohort value1>', '<cohort value2>'],
}}
/>
// hashtag playlist
<VideoFeed
style={{ height: 200 }}
source="hashtagPlaylist"
mode="row"
channel="your encoded channel id"
hashtagFilterExpression="<hashtag filter expression>"
/>
// sku
<VideoFeed
style={{ height: 200 }}
source="sku"
mode="row"
channel="your encoded channel id"
productIds={['prodct_id_1', 'product_id_2']}
/>
// single content
<VideoFeed
style={{ height: 200 }}
source="singleContent"
mode="row"
contentId="your encoded video or live stream id"
/>Mode
VideoFeed component supports three modes: row, column, and grid.
Use grid mode:
Autosizing
To enable autosizing, set autosizing={true} and maxVideos together. These two properties must always be used together.
Video feed configurations
Please consult Video feed configurations (React Native).
Video player configurations
Please consult Player configurations (React Native).
Video feed loading result callback
VideoFeed component provides onVideoFeedLoadFinished prop for setting video feed loading result callback.
Video feed videos loaded callback
Use onVideoFeedVideosLoaded to receive the videos loaded by VideoFeed on iOS and Android. The callback receives a VideoPlaybackDetails[] directly.
It fires for the initial page and each subsequent page. Each call contains only the newly loaded batch, not the accumulated list. On Android, it also fires for pull-to-refresh and pages loaded by the full-screen player opened from this component.
This callback supplies video data; the existing onVideoFeedLoadFinished callback continues to report the loading result. See event details for the hashtag field.
Force refreshing video feed
Enable PiP(Picture in Picture)
Please refer to Enable PiP(Picture in Picture).
onVideoFeedClick
The callback is triggered when users click the video feed item. The event type is VideoFeedClickEvent.
onCustomCTAClick
The callback is triggered when users click the CTA button on the video in the video player. We start the floating player in the following sample codes. The event type is CustomCTAClickEvent.
Reference
Last updated
Was this helpful?