Video Feed (Android)

When you integrate Firework SDK into your application, you get access to a library of millions of videos. You can make these videos available in your application based on app-based as well as user-based configurations and preferences. In this integration guide as well as in the API reference documentation, the stream of videos based on configurations and preferences is referred to as "Video Feed" or "video feed" and collectively as "Video Feeds" or "video feeds".

Currently, there are 4 broader types of video feeds

VideoFeedView

It is a custom view that displays video thumbnails for each video in the Video Feed in an infinitely scrollable horizontal, vertical, or grid layout. When a user clicks on one of the video thumbnails, a media player launches and starts playing the selected/clicked video.

You can include FwVideoFeedView in your view hierarchy via XML and specify Video Feed using XML attributes or Programmatically. Below is the XML code snippet that displays a Discovery Video Feed in a Grid layout.

<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="discovery"/>

To initialise the FwVideoFeedView host app must call init() function which accepts ViewOptions instance as an optional parameter:

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

Learn more about different Video Feed Layouts and Configuring VideoFeedView

Last updated