LLin233 / Toro

Video list auto playback made simple, specially built for RecyclerView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toro

Buy Me a Coffee at ko-fi.com

Download Android Arsenal

Join the chat at https://gitter.im/eneim/Toro

<a href="https://www.iconfinder.com/icons/1105270/brand_connect_shape_square_icon#size=512"">

Video list auto playback made simple, specially built for RecyclerView

0. Latest Version: Download

See CHANGELOG.md for more information.

1. Main features:

  • Auto start media playback after RecyclerView layout has been settled down.

  • Auto start/pause/resume media base on RecyclerView scroll state.

  • Auto save latest media last playback position and resume from there later (note: in Android default Media Player API, depend on Video's format and codec, the resume timestamp may varies).

  • Customizable playback behavior:

    • Customizable playback Strategy to decide the best component to start playback.
    • UI-based approach: you see the Video, then it can play. Default: you see 75% of the Video then it can start playing. Advance: you decide how much the visible Video should trigger the playback. See Wiki for more details.
  • Powerful, flexible and highly customizable API. See Wiki for more details.

  • Selective playback: among many playable items, Strategy helps find the best one to start playback.

  • Extensions: ExoPlayer (v2, v1), (legacy) Android MediaPlayer API.

    • Toro Extended: extension based on ExoPlayer 2, provides the concept of "Next Player to play" (abstract concept for loop/auto scroll, ...), and long click/press handling. See Wiki for more information.
  • Lots of built-in components, but Toro is still highly customizable.

See Wiki for more details.

2. Toro in Action

3. How to use

0. Pre-requirement
  • Min support version: Android SDK level 16 (4.1.x)
1. Add Toro to your project
  • Make sure to have this in Project's top level build.gradle
allprojects {
	repositories {
    // Android Studio has this by default.
		jcenter()
	}
}
  • Add this to dependencies
ext {
	toroVersion = '2.2.0'
}

dependencies {

  // TODO !IMPORTANT: use only one of the following
  
  // include in your module (app or library)
  // include only core Toro library
  compile "im.ene.toro2:toro:${toroVersion}"

  // include Toro extended helper (Toro and ExoPlayer v2 extension is included already)
  compile "im.ene.toro2:toro-extended:${toroVersion}"
  
  // include extension for ExoPlayer v2 (Toro is included already)
  compile "im.ene.toro2:toro-ext-exoplayer2:${toroVersion}"
  
  // include extension for ExoPlayer v1 (Toro is included already)
  compile "im.ene.toro2:toro-ext-exoplayer:${toroVersion}"
  
  // include extension for Legacy MediaPlayer (Toro is included already)
  compile "im.ene.toro2:oro-ext-mediaplayer:${toroVersion}"
}

Latest version is always visible here: Download

TL,DR: toro-sample module from this library comes with several good practice of this library. Please take a look.
2. Integrate Toro into your Application: see Toro starting guide
3. Register/Unregister a RecyclerView to get support from Toro: see Register/Unregister RecyclerView to Toro
4. Create ViewHolder to use with Toro: see This Wiki to see how to start implementing.
5. Core concepts and components of Toro: see Wiki

Contribute to Toro

  • Issue report and PRs are welcome.

  • Buy me some coffee for shorter update cycle ...

Buy Me a Coffee at ko-fi.com

Hall of Fames

Use Toro in your App? Email me to get promoted here.

License

Copyright 2016 eneim@Eneim Labs, nam@ene.im

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

   http://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

Video list auto playback made simple, specially built for RecyclerView

License:Other


Languages

Language:Java 100.0%