Player Deck (React Native)
The PlayerDeck component displays a horizontally scrollable row of video thumbnails with inline playback and product cards. Currently, there are eight source types of player deck:
Discover
Channel
Playlist
Playlist Group
Dynamic Content
Hashtag Playlist
SKU
Single Content
Integration
import { PlayerDeck } from 'react-native-firework-sdk';
// discover
<PlayerDeck
style={{ height: 580 }}
source="discover"
/>
// channel
<PlayerDeck
style={{ height: 580 }}
source="channel"
channel="your encoded channel id"
/>
// playlist
<PlayerDeck
style={{ height: 580 }}
source="playlist"
channel="your encoded channel id"
playlist="your encoded playlist id"
/>
// playlist group
<PlayerDeck
style={{ height: 580 }}
source="playlistGroup"
playlistGroup="your encoded playlist group id"
/>
// dynamic content
<PlayerDeck
style={{ height: 580 }}
source="dynamicContent"
channel="your encoded channel id"
dynamicContentParameters={{
'<cohort key>': ['<cohort value1>', '<cohort value2>'],
}}
/>
// hashtag playlist
<PlayerDeck
style={{ height: 580 }}
source="hashtagPlaylist"
channel="your encoded channel id"
hashtagFilterExpression="<hashtag filter expression>"
/>
// sku
<PlayerDeck
style={{ height: 580 }}
source="sku"
channel="your encoded channel id"
productIds={['product_id_1', 'product_id_2']}
/>
// single content
<PlayerDeck
style={{ height: 580 }}
source="singleContent"
contentId="your encoded video or live stream id"
/>Player deck loading result callback
PlayerDeck component provides onPlayerDeckLoadFinished prop for setting player deck loading result callback.
Empty callback
PlayerDeck component provides onPlayerDeckEmpty prop for setting player deck empty callback.
Player deck videos loaded callback
Use onPlayerDeckVideosLoaded to receive the videos loaded by PlayerDeck 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 onPlayerDeckLoadFinished callback continues to report the loading result. See event details for the hashtag field.
Force refreshing player deck
Get feed id
PlayerDeck component provides onPlayerDeckGetFeedId prop for getting the feed id.
Enable PiP(Picture in Picture)
Please refer to Enable PiP(Picture in Picture).
Player deck configurations
Please refer to Player deck configurations (React Native).
Player configurations
Please refer to Player configurations (React Native).
Reference
Last updated
Was this helpful?