react-native-firework-sdk
    Preparing search index...

    Interface IVideoFeedProps

    The props of VideoFeed component.

    interface IVideoFeedProps {
        adConfiguration?: AdConfiguration;
        autosizing?: boolean;
        channel?: string;
        contentId?: string;
        dynamicContentParameters?: { [key: string]: string[] };
        enablePictureInPicture?: boolean;
        enableSystemPictureInPicture?: boolean;
        hashtagFilterExpression?: string;
        maxVideos?: number;
        mode?: VideoFeedMode;
        onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void;
        onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;
        onVideoFeedEmpty?: (error?: FWError) => void;
        onVideoFeedGetFeedId?: (feedId: string) => void;
        onVideoFeedLoadFinished?: (error?: FWError) => void;
        onVideoFeedVideosLoaded?: (videos: VideoPlaybackDetails[]) => void;
        playlist?: string;
        playlistGroup?: string;
        productIds?: string[];
        source: VideoFeedSource;
        style?: StyleProp<ViewStyle>;
        videoFeedConfiguration?: VideoFeedConfiguration;
        videoPlayerConfiguration?: VideoPlayerConfiguration;
    }
    Index

    Properties

    adConfiguration?: AdConfiguration

    Ad configuration of the feed.

    autosizing?: boolean

    Whether the feed sizes its own height to fit its content instead of requiring a fixed height from the host app. Defaults to false.

    Intended for a feed inside a scrolling parent such as ScrollView or FlatList: the feed expands to the full height of its content, does not scroll internally, and autoplay is evaluated against the surrounding viewport, so the item that is actually on screen plays as the parent scrolls.

    For behavior identical on both platforms, use grid mode with autosizing enabled (maxVideos optional). That is the supported combination; the others differ: iOS also autosizes column, and in row mode keeps a fixed row height and scrolls horizontally as usual, while on Android the prop is ignored outside grid mode, with a warning.

    When enabled:

    • The height is driven by the native feed; any height in style is ignored. Do not set flex, minHeight or maxHeight on the feed either.
    • In grid/column mode the feed loads at most 20 videos (maxVideos is clamped to 20) to keep the expanded height bounded.
    • The value is fixed when the native feed is created. Changing it, or changing mode, re-creates the native feed, which reloads its content from the first page.
    channel?: string

    Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.

    contentId?: string

    The video or live stream id. Only supported on iOS.

    dynamicContentParameters?: { [key: string]: string[] }

    The dynamic content parameters of the feed. Required when the source is set as dynamicContent.

    enablePictureInPicture?: boolean

    Specifies if Picture in Picture is enabled.

    enableSystemPictureInPicture?: boolean

    Controls whether the system (native iOS) Picture-in-Picture is enabled. When set to false, the system PiP window will not appear automatically, while background audio and the in-app floating player continue to work. Defaults to true. Only supported on iOS.

    hashtagFilterExpression?: string

    Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria. Queries are specified with boolean predicates on what hashtags are there on the video. For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions. Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis. Required when the source is set as hashtagPlaylist.

    maxVideos?: number

    Caps the total number of videos loaded into the feed. The feed paginates (20 videos per page) until this total is reached and then stops loading more. Must be a positive integer; other values are ignored (no cap) with a warning. Defaults to undefined (no cap).

    When autosizing is enabled in grid/column mode, the effective cap is at most 20.

    On iOS the cap applies to any feed. On Android it applies only to an autosized grid feed and is ignored otherwise, with a warning: the Android SDK derives the content-height grid from the cap itself, so capping a fixed-height feed would silently make it autosize.

    The value is fixed when the native feed is created. Changing it re-creates the native feed, which reloads its content from the first page.

    One of three available display modes. Defaults to row.

    onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void

    Start Picture in Picture callback. Only supported on iOS.

    onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void

    Stop Picture in Picture callback. Only supported on iOS.

    onVideoFeedEmpty?: (error?: FWError) => void

    The callback is triggered when the feed loads successfully but there are no items in the video feed. onVideoFeedLoadFinished will not be triggered in this case; the two callbacks are mutually exclusive.

    onVideoFeedGetFeedId?: (feedId: string) => void

    The host app could use this callback to get feed id. The feed id can be used for conversion tracking.

    onVideoFeedLoadFinished?: (error?: FWError) => void

    The feed loading result callback. It means loading successfully when error equals to undefined. This callback will not be triggered when the feed is empty; onVideoFeedEmpty will be triggered instead.

    onVideoFeedVideosLoaded?: (videos: VideoPlaybackDetails[]) => void

    The callback is triggered when videos are loaded in the video feed. It fires for the initial page and again for every subsequent page (load more), and each call delivers only the newly loaded batch of videos rather than the accumulated list. On Android it also fires for pull-to-refresh and for the pages loaded by the full-screen player opened from this video feed.

    playlist?: string

    Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.

    playlistGroup?: string

    PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.

    productIds?: string[]

    Product ids used to generate the sku feed

    One of five available video feed sources.The playlistGroup is only supported on iOS. Defaults to discover.

    style?: StyleProp<ViewStyle>

    Standard React Native View Style. When autosizing is enabled, the height is driven by the feed content and any height set here is ignored.

    videoFeedConfiguration?: VideoFeedConfiguration

    Configuration of the feed.

    videoPlayerConfiguration?: VideoPlayerConfiguration

    Configuration of the player.