Skip to content

A video player of Exoplayer on LazyColumn(list view) of Jetpack Compose. Codes are structured with MVVM and modularization.

License

Notifications You must be signed in to change notification settings

ChillingVan/compose-exoplayer-LazyColumn-example

Repository files navigation

compose-exoplayer-LazyColumn-example

A video player of exoplayer on LazyColumn(list view) of Jetpack Compose. Codes are structured with MVVM and modularization.

Related Blog

This project shows a example of using Exoplayer with Jetpack Compose.

Here are the features included:

  • Play videos in a LazyColumn(Similar to play videos on a RecyclerView)
  • Play video with full screen.
  • Custom play controller view with Jetpack Compose, especially the seek bar. Thanks to Compose-sliders
  • Listening to the scroll event of LazyColumn and play automatically.
  • Play consecutively between List Page and Detail Page.
  • Codes are organized and modularized.
  • Use MVVM design pattern.
  • Support vertical pager in the video detail page to allow scrolling up and down to switch videos

Modules

  • app: The app entry - contains something like the Application and MainActivity.
  • core-ui: The common views - contains auxiliary UI components and specific dependencies that need to be shared between other modules.
  • core-navigation: This contains the codes about data sharing between pages.
  • core-video: Common library about Exoplayer control. It contains full screen control, video play event control.
  • feature-main: Feature specific module for main page. The UI of video list view and view model are included here.
  • feature-videodetail: Feature specific module for video detail page.The UI of video detail view and view model are included here.

Pages

The application has two screens(two pages).

  1. Main page screen - List of Videos and the videos can play on the list directly. See the MainPageScreen.kt for detail.
  2. Video detail screen - One Video in a detail page with detail description. See the VideoDetailScreen.kt for detail

sample1 sample2 sample3

About

License

Copyright 2021 compose-video Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

A video player of Exoplayer on LazyColumn(list view) of Jetpack Compose. Codes are structured with MVVM and modularization.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages