Feed usage
Load vertical Rixl media feeds by feed ID, configure playback, and handle mute and index events.
Connect the SDK before mounting the feed, as shown in Installation.
import {Feed} from "@rixl/media-react/feed";
export function MediaFeed() {
return (
<Feed
feedId="YOUR_FEED_ID"
muted
loop
autoscroll
style={{display: "block", height: "36rem"}}
onMuteChange={(muted) => console.log("Muted:", muted)}
onCurrentIndexChange={(index, postId) => console.log(index, postId)}
/>
);
}feedId selects the feed. The SDK loads and paginates its posts and resolves the media IDs used by its children. Give the feed a height so it has a visible scrolling viewport.
loopenables looping behavior.autoscrollenables automatic advancement after video completion or the image dwell interval.mutedsets the initial mute preference;onMuteChangereports changes.onCurrentIndexChangereceives the visible index and the post ID, when available.
Published SDK components use Rixl data loading. Direct posts and custom onFetchMore inputs are private development shortcuts and do not replace SDK pagination in npm builds. The removed creatorId and startPostId props had no effect; select the appropriate feed using feedId.
See Feed props for configuration and event details.