Releases: eneim/toro
Releases · eneim/toro
2.3.0 (2017/05/18)
Internal update
- ExoPlayer version up to 2.4.0, using full module set.
- Add PlayerManager#savePlaybackState, PlayerManager#restorePlaybackState, PlayerManager#getPlaybackState, PlayerManager#getPlaybackStates.
- PlaybackState implement Parcelable to help saving/restoring states in Activity/Fragment recreation.
- Add ExoPlayerView and ViewHolders built around it. ExoPlayerView use official SimpleExoPlayerView with some improvement. ViewHolders use this also need to provide a MediaSource. Util class ExoPlayerHelper is added to help building MediaSource easily.
- Demo apps is updated with removing the use of deprecated classes.
- Facebook sample is updated with fine-crafted Full screen playback.
- Many other small updates.
Bug Fixes
- Fix #186: Single item list now plays video correctly, sample added to demo app.
- Fix #193: NPE when unregistering RecyclerView.
- Fix #190: Updating ExoPlayer also fix this issue of NoClassDefFoundError of AdaptiveVideoTrackSelection.
- Fix #183: Now loop playback will work correctly. Also it is not recommended when using with LoopMediaSource.
- Fix #174: A trick to work around this rare state.
- Fix #167.
Maybe more issues are fixed along with this release.
Deprecated
- Toro#attach(Activity) and Toro#detach(Activity) are now deprecated. Using registering directly (View context must be an Activity).
- ExoVideoView and those ViewHolder built around it are deprecated. Use ExoPlayerView and the ViewHolders built around it.
- Deprecate PlayerManager#saveVideoState, PlayerManager#restoreVideoState, PlayerManager#getSavedState. These methods will be removed in next big release.
Known issues
- ToroViewPagerHelper is not working well. Solution for ViewPager is under investigation.
- Facebook sample may contain some memory leak, just ignore it for now.
2.2.0 (2017/03/05)
v2.2.0 Release v2.2.0 (2017/03/05)
2.2.0 SNAPSHOT
Big changes
- Adapter is required to implement "PlayerManager"
- "MediaPlayerManager" is now "PlayerManager".
- There is default BaseAdapter that can be extended to help the new change. See this sample for instance.
- There is default implementation for "PlayerManager" that can be used as delegation for Adapter that doesn't extend BaseAdapter. Usage can be found in how BaseAdapter is implemented.
- ExoVideoView is deprecated, ExoPlayerView is added to replace it. ExoPlayerView uses ExoPlayer's official SimpleExoPlayerView internally.
- All classes those are backed by ExoVideoView are deprecated, alternative classes are added accordingly.
Bug fix and improvement
- Lots of bug fixes and Performance improvement.
- RecyclerView registering/unregistering are now recommended to do in creation/destroying of life cycle (i.e onCreate/onDestroy for Activity and onViewCreated/onDestroyView for Fragment).
- Life Cycle handling is improved.
- Lots of leak prone are fixed.
Setup SNAPSHOT dependency
- In root folder, add this to build.gradle's allprojects block:
allprojects {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}- In app folder, add this to build.gradle's dependencies block:
compile "im.ene.toro2:toro-extended:2.2.0-SNAPSHOT"- IMPORTANT: change the dependency artifact Id to your need. There are 'toro-extended', 'toro-ext-exoplayer2', 'toro-ext-exoplayer', 'toro-ext-mediaplayer'.
2.1.0 (2016/10/26)
Big big change, see CHANGELOG.md for more information.
1.2.0 (2016.04.06)
Breaking changes. Clients should take care of this release.
- [CHANGE] Better error handling, see this PR.
ToroPlayer#onPlaybackError(...)will now require a _boolean response_. - [CHANGE] [NEW FEATURE] Support _loop playback. Current playing ToroPlayer could automatically repeat immediately after it completes latest playback. Loop playback is _disable by default. Setup by overriding
ToroPlayer#isLoopAble()and return _true_. Sample usage:
public class MyLoopAblePlayerViewHolder extends ToroViewHolder {
// Do stuff
// Support loop on this ViewHolder
@Override public boolean isLoopAble() {
return true;
// You may want to control it better like following implementation
// return getAdapterPosition() % 2 == 0;
}
}- [NEW FEATURE] Ability to temporary pause all playing players by new ToroStrategy: _REST_ (internal API, user has no direct access to this). This Strategy will disable all player. This is useful for the cases when Client would like to open a Dialog (Eg: A big floating playback window) on top of current window, then it wants to pause the player until that Dialog dismisses. Usage (see sample App for more information):
Toro.rest(true); // Tell Toro you want to take a rest
// Do stuff which requires the player to be silent.
Toro.rest(false); // Done stuff, resume the playback.Please note that using this feature should be careful. It's really simple implementation, for really simple usecase. 2 calls should always be coupled. So please don't screw up your App.
- [NEW FEATURE] Custom LayoutManager: Client can now add their own LayoutManager. The requirement is that LayoutManager must implement ToroLayoutManager interface to help Toro knows how to travel throw the Children. Sample is coming soon.
- [INTERNAL CHANGE] Custom ViewHolder with RecyclerViewItemHelper: RecyclerViewItemHelper is now public and non-final. This allows client to create their own ViewHolder just by implementing ToroPlayer interface, and still get support from Toro's core. Just use/extend RecyclerViewItemHelper wisely. Sample is coming soon.
- Better UI for sample App.
- Many internal improvement.
- MIGRATING FROM 1.1.0 TO 1.2.0: fix/re-code all your
ToroPlayer#onPlaybackError. If you have any problem, don't hesitate to create new issue or even notify my via Gitter.
1.1.0 (2016.02.09)
Happy Vietnam New Lunar Year!
This release contains some changes from internal API as well as code improvement:
- Narrow down visibility of some classes and object. Clients should test carefully for side-affect. So sorry for this inconvenient. Normally you would not be affect, unless you have some custom components.
- VideoPlayerManagerImpl is now package private. Don't use it else where. Instead, implement to your Adapter.
- ToroScrollListener is now package private. Don't use it else where.
- Built-in strategies is strengthen by more accurate decision on
#allowsToPlay()method. - Some other code improvement.
1.0.0 (2016.02.06)
First stable release, see README.md and Wiki for more.