Android library

Compose Reels Player

A reusable vertical video feed for Kotlin apps, with one active Media3 player, custom overlays, lifecycle-aware playback, caching, and analytics hooks.

What it handles

Playback plumbing for short-form feeds.

Keep your product UI in the overlay slot while the library owns the player lifecycle, gestures, preloading, errors, and progress affordances.

  • Vertical pagerFull-screen reels, shorts, stories, and clip feeds in Jetpack Compose.
  • Media3 playbackMP4, HLS, and DASH support through ExoPlayer.
  • Bounded preloadingPrepare nearby muted players without letting memory run wild.
  • Custom overlaysBring your own like, comment, share, profile, caption, or moderation UI.
  • Gesture hooksSingle tap, double tap, and long press behavior can plug into your app.
  • Analytics eventsTrack impressions, starts, pauses, completions, skips, buffering, watch time, mute changes, and errors.

Install

Add it with JitPack.

Requires Android min SDK 24+, Kotlin, Jetpack Compose, and Media3. Compose, Lifecycle, Coil, and Media3 dependencies are included transitively.

settings.gradle.ktsrepositories
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven("https://jitpack.io")
    }
}
build.gradle.ktsdependency
dependencies {
    implementation("com.github.mathewGlenn:ComposeReelsPlayer:0.1.2")
}

Usage

Drop in the player, keep control of the feed.

Use the controller for playback and navigation, then listen for current reel changes and analytics events from your host screen.

ReelsScreen.ktbasic setup
@Composable
fun ReelsScreen() {
    val controller = rememberReelsPlayerController()

    ReelsPlayer(
        items = reels,
        controller = controller,
        onCurrentReelChanged = { index, item ->
            println("Current reel: $index ${item.id}")
        },
        onAnalyticsEvent = { event ->
            println("Reels analytics: $event")
        },
        onLoadMore = {
            println("Load more reels")
        }
    )
}
01

Map media

Use ReelItem or map your own item model into ReelsMediaSource.Video.

02

Own the overlay

Add app-specific product actions while default playback controls stay library-owned.

03

Tune behavior

Configure autoplay, mute state, preloading, cache keys, load-more thresholds, and gestures.