All Projects → nihk → videopager

nihk / videopager

Licence: other
An app showing how to make an Instagram/YouTube Shorts/TikTok style video pager

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to videopager

CommenPlayer
CommenPlayer ——Video player, Support ijkPlayer, Vlc, MediaPlayer, ExoPlayer; 视频播放器,支持ijkPlayer,Vlc,MediaPlayer,ExoPlayer
Stars: ✭ 81 (+35%)
Mutual labels:  exoplayer
MovieDb
No description or website provided.
Stars: ✭ 34 (-43.33%)
Mutual labels:  viewpager2
VideoMetadataProvider
Video metadata provider library (collect metadata from ExoPlayer, FFMpeg, Native Android)
Stars: ✭ 20 (-66.67%)
Mutual labels:  exoplayer
media
Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
Stars: ✭ 294 (+390%)
Mutual labels:  exoplayer
podcast-app
Podcast App
Stars: ✭ 291 (+385%)
Mutual labels:  exoplayer
cordova-plugin-playlist
🎶 A Cordova plugin for Android and iOS with native support for audio playlists, background support, and lock screen controls 🎶
Stars: ✭ 32 (-46.67%)
Mutual labels:  exoplayer
cordova-plugin-exoplayer
Media player plugin for Cordova that uses Google's ExoPlayer
Stars: ✭ 48 (-20%)
Mutual labels:  exoplayer
MQPlayer
Android video player based on FFmpeg and Exoplayer
Stars: ✭ 20 (-66.67%)
Mutual labels:  exoplayer
NSMPlayer-Android
No description or website provided.
Stars: ✭ 18 (-70%)
Mutual labels:  exoplayer
kaltura-player-android
Kaltura Player is a rich, easy to integrate and easy to use video player for all media types and ad scenarios you need. - based on Google ExoPlayer
Stars: ✭ 22 (-63.33%)
Mutual labels:  exoplayer
BooksApp
Book selling application with MVVM (Model, View, ViewModel), LiveData, DataBinding, Retrofit, Room Database, Navigation Component(NavGraph, BottomNav), ViewPager2 in TabLayout, SearchView, Vertical Adapter(BestSellers) and Horizontal Adapter(All Books) with ConcatAdapter for Main Screen, Firebase Auth, SearchView in Adapter, Picasso, Lottie, Ani…
Stars: ✭ 53 (-11.67%)
Mutual labels:  viewpager2
BakingApp
Udacity Android Developer Nanodegree, project 2.
Stars: ✭ 54 (-10%)
Mutual labels:  exoplayer
Viewpager2-Transformation
No description or website provided.
Stars: ✭ 20 (-66.67%)
Mutual labels:  viewpager2
ARVI
Android library designed to simplify the implementation of the video autoplay in the RecyclerView
Stars: ✭ 69 (+15%)
Mutual labels:  exoplayer
Bilibili-MusicPlayer
B站音乐区音频第三方播放器 (Bilibili Third-party online music player for Android) MVVM+Room+LiveData+Retrofit+Exoplayer
Stars: ✭ 19 (-68.33%)
Mutual labels:  exoplayer
YetAnotherVideoPlayer
Yet Another Video Player for Andoid
Stars: ✭ 62 (+3.33%)
Mutual labels:  exoplayer
DoubleTapPlayerView
YouTube's Fast-Forward-Rewind double tapping feature built on top of ExoPlayer
Stars: ✭ 81 (+35%)
Mutual labels:  exoplayer
BannerView
Android BannerView 图片轮播控件,支持无限循环,可设置显示各种样式,支持添加banner切换动画。调用简单,代码稳定,体积小。
Stars: ✭ 23 (-61.67%)
Mutual labels:  viewpager2
p2p-cdn-sdk-android
Free p2p cdn android github sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀
Stars: ✭ 39 (-35%)
Mutual labels:  exoplayer
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (+106.67%)
Mutual labels:  viewpager2

demo

It's pretty straightforward to get started using ExoPlayer by following the library's Hello world! documentation. Once you throw Android's lifecycles and state management into the mix, however, things quickly get more complex. It's easy to accidentally leak memory and hard to coordinate things in a way that's efficient and looks good in the UI. And that's just for playback of videos on a simple screen! Combining ExoPlayer with a ViewPager or RecyclerView adds a whole 'nother layer of complexity.

With this repository I wanted to demonstrate a small app showing how to do Instagram/YouTube Shorts/TikTok style video paging in a way that reconciles Android lifecycles and state management.

The approach I took is to reuse the same ExoPlayer and PlayerView instance for all pages. The ExoPlayer instance lives in and is managed by MainViewModel, and a singular PlayerView gets attached to whichever ViewHolder is active on the current page. Having only one PlayerView makes for a lot less state management.

I've been a bit more verbose with comments than I typically would in this repository, for the purposes of clarity. For testability I've added abstractions that wrap a few ExoPlayer APIs. I've also used an MVI architecture; this increases boilerplate but greatly minimizes state management.

This repository includes examples of streaming videos over the network (from Reddit /r/tiktokcringe) and local assets. It can be modified to handle video data coming from any data source.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].