Playlist Feed

Similar to channel feed, playlist feed is predefined but unlike channel feed, its order is deterministic. Video Feed will include videos in the same order that they were added and the recommendation engine plays no role here.

Example code snippet for Playlist Feed

<com.firework.videofeed.FwVideoFeedView
        android:id="@+id/videoFeedView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:fw_columns="3"
        app:fw_feedLayout="grid"
        app:fw_feedResource="playlist"
        app:fw_channelId="Your Encoded Channel Id"
        app:fw_playlistId="Your Encoded playlist Id"
        />

Programmatically setting a Playlist as a resource.

val viewOptions = viewOptions {
    baseOptions {
        feedResource(
            FeedResource.Playlist("Encoded channel id", "Encoded playlist id"),
        )
    }
    layoutOptions {
        feedLayout(
            FeedLayout.HORIZONTAL
        )
    }
}

val videoFeedView = findViewById<FwVideoFeedView>(R.id.videoFeedView)
videoFeedView.init(viewOptions)

Please refer to the Encoded IDs help article to learn about how to find your encoded channel ID and playlist ID

Last updated