AutoPlayer - A player based on ExoPlayer for play video automatically in RecyclerView, when an item is visible.

Overview

AutoPlayer

A player based on ExoPlayer for play video automatically in RecyclerView, when an item is visible.

Features:

  • This library supports the Auto-play video even though there are multiple View-Types and View-Holders in RecyclerView.
  • Automatically detect the visible video and play it while pause the other videos.
  • Fully customizable settings (Auto Play, Default Mute, Use Controller, Enable Caching etc.).
  • Support Mute/Unmute.
  • Support Attractive controller for video.
  • Automatically detect the highest visible video if there are more than 1 player visible same time on the screen.

To add this Library in your project :

  • Step 1. Add the JitPack repository to your build file

    allprojects {
        repositories {
           ...
           maven { url 'https://jitpack.io' }
        }
    }
    
  • Step 2. Add the dependency

    dependencies {
        implementation 'com.github.kishansinghpanwar:AutoPlayer:v1.0.0'
    }
    

Basic Usage :

  • Step 1. Setup the AutoPlayerManager in your Activity/Fragment with your custom settings for Player :

     AutoPlayerManager autoPlayerManager = new AutoPlayerManager(this);  
     autoPlayerManager.setAutoPlayerId(R.id.autoPlayer);  
     autoPlayerManager.setUseController(true);  
     autoPlayerManager.attachRecyclerView(rvFeeds);  
     autoPlayerManager.setup();
    

    See usage: MainActivity.java


  • Step 2. Add AutoPlayer in your Adapter XML :

    ">
      
        
    

    See usage: item_layout_video.xml


  • Step 2. Set Player URL and Placeholder in your Adapter class :

    holder.autoPlayer.setUrl(feedBeanList.get(position).getUrl());  
    holder.autoPlayer.setAnimationTime(500);  
    holder.autoPlayer.setPlaceholderView(holder.placeHolderView);
    

    See usage: FeedAdapter.java

You might also like...
Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.

ijkplayer Platform Build Status Android iOS Video player based on ffplay Download Android: Gradle # required allprojects { repositories {

To play video on layout background (textureview videoview for layout designs)
To play video on layout background (textureview videoview for layout designs)

The normal videoview on Android is very costly in terms of performance. Also, due to the video resolution ratio and apk size, most developers don't want to include videos in the project. With this library, developers will have a performance-friendly video background with a few lines of code.

Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and more.
Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and more.

Blade Player Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and m

Radio Player - A Flutter plugin to play streaming audio content with background support and lock screen controls.

A Flutter plugin to play streaming audio content with background support and lock screen controls. Installation To use this package, add

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 🚀
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 🚀

Android p2p cdn sdk to distribute load and reduce costs(https://peervadoo.com) Vadootv is a p2p sdk integration to reduce your video streaming costs b

Video Transcoder is an application which uses the open source program FFmpeg to transcode video files from one format to another.
Video Transcoder is an application which uses the open source program FFmpeg to transcode video files from one format to another.

Video Transcoder Do you want to encode videos on your phone into different formats, trim videos, or extract audio? Are you looking for a free solution

The Madman library (Media Ads Manager) enables you to advertise video contents with video ads.
The Madman library (Media Ads Manager) enables you to advertise video contents with video ads.

Madman (Media ads manager) is a high performance alternative to Google's standard IMA android SDK. If you have your own VAST server and want to render video ads and have full control over the UI, then this library is for you.

Custom Android view with video player, loader and placeholder image
Custom Android view with video player, loader and placeholder image

VideoPlayerView Custom Android view with video player, loader and placeholder image. To stay up-to-date with news about the library Usage Here is an e

NOVA is an open source video player for Android

NOVA: opeN sOurce Video plAyer Overview NOVA is an open source video player for Android. It consists in a fork of the original Archos Video Player Com

Comments
  • Scroll Listener

    Scroll Listener

    I have a recyler view in app homepage and inside that recycler view i have nested recycler view which is in horizontal direction, Since i have 2 recycler view i am able to attach scroll listener to any one, is there any way i can attach scroll listener to both recycler view and pause scroll on horizontal and vertical scroll both. Thanks

    question 
    opened by sulemankhan2022 1
  • AutoPlayer Failed resolution

    AutoPlayer Failed resolution

    I have followed all the steps in AutoPlayer but, I have a problem in AutoPlayer i.e.

    PID: 6354 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/ExoPlayerFactory; at com.player.autoplayer.utils.HelperForExoPlayer.(HelperForExoPlayer.kt:90) at com.player.autoplayer.AutoPlayerManager.setup(AutoPlayerManager.kt:179) at com.qti.bigamal.fragment.HomeFragment.onCreateView(HomeFragment.kt:96)

    question 
    opened by lukm4nn 0
Releases(v1.0.0)
Owner
Kishan Singh
Android Developer with around 5+ years experience
Kishan Singh
Yet Another Video Player (or YAVP) is a Video Player for Android that is based on Googles ExoPlayer.

Yet Another Video Player Yet Another Video Player (or YAVP) is a Video Player for Android that is based on Googles ExoPlayer. Who Is YAVP For? First o

null 62 Dec 29, 2022
Compose-video-player - Video player for Android Compose powered by ExoPlayer

Compose Video Player Video player for Android Compose powered by ExoPlayer. Addi

Juan Pablo Herrera 22 Dec 13, 2022
Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer

Just (Video) Player Android video player based on ExoPlayer It uses ExoPlayer's extension-ffmpeg with all its audio formats enabled (it can handle eve

Marcel Dopita 677 Dec 28, 2022
Fermata Media Player is a free, open source audio and video player with a simple and intuitive interface.

Fermata Media Player About Fermata Media Player is a free, open source audio and video player with a simple and intuitive interface. It is focused on

Andrey 227 Jan 6, 2023
The androidx.media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android

AndroidX Media AndroidX Media is a collection of libraries for implementing media use cases on Android, including local playback (via ExoPlayer) and m

Android Jetpack 310 Dec 29, 2022
Android SRT player powered by Exoplayer and srtdroid

SrtPlayer An Android SRT test player powered by ExoPayer. Most of this code comes from YoussefHenna reply in the SRT support ExoPayer issue. It demons

Thibault Beyou 4 Sep 20, 2022
ExoPlayer - an application level media player for Android

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks.

Halil Özel 6 Oct 31, 2022
ZExoRecyclerPlayer is an Android library that allows developers to easily create RecyclerView with Exoplayer .

ZExoRecyclerPlayer Description ZExoRecyclerPlayer is an Android library that allows developers to easily create RecyclerView with Exoplayer . Please f

mohammed alzoubi 4 Dec 12, 2022
Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.

ijkplayer Platform Build Status Android iOS Video player based on ffplay Download Android: Gradle # required allprojects { repositories {

bilibili 31k Jan 3, 2023
mpv-android is a video player for Android based on libmpv.

mpv-android is a video player for Android based on libmpv.

null 1.1k Jan 6, 2023