Skip to content

ronitgulia/ExoReel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExoReelApp

An Android application that demonstrates a TikTok-style vertical video reel using Media3 ExoPlayer and ViewPager2.

Features

  • Vertical scrolling video feed using ViewPager2.
  • Seamless video playback with ExoPlayer.
  • Support for local video resources (MP4).
  • Fullscreen video activity on item click.
  • Automatic playback and looping.

Project Structure

  • MainActivity.kt: Sets up the ViewPager2 and handles the video data list.
  • ReelAdapter.kt: Manages the ExoPlayer instances for each reel and handles view recycling.
  • ReelViewHolder.kt: Holds the PlayerView and UI elements for each reel item.
  • ExoplayerActivity.kt: A dedicated activity for viewing a specific reel in detail.
  • res/raw: Contains the video assets (video_1.mp4 to video_5.mp4).

Setup

  1. Ensure you have the latest version of Android Studio installed.
  2. Clone the repository and open the project.
  3. Sync the project with Gradle files.
  4. Run the application on an Android device or emulator (API 24+).

Recent Fixes

  • Resource Management: Moved video files from res/drawable to res/raw to comply with Android resource standards and fixed naming conventions (starting with letters).
  • Memory Optimization: Implemented proper ExoPlayer release logic in the adapter's onViewRecycled to prevent memory leaks during scrolling.
  • Playback Issues: Added diagnostic logging to investigate decoding issues on some devices for specific video files.

Dependencies

  • androidx.media3:media3-exoplayer
  • androidx.media3:media3-ui
  • androidx.viewpager2:viewpager2
  • androidx.constraintlayout:constraintlayout

About

A TikTok-style vertical video reel for Android, built with Media3 ExoPlayer and ViewPager2. Features seamless looping playback, memory-safe player recycling, and a fullscreen detail view — demonstrating modern Android media architecture on API 24+.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages