Video list auto playback made simple, specially built for RecyclerView
This release is to support ExoPlayer 2.10.3. This will be the last version of ExoPlayer 2.10.x to be supported. From next release, Toro will support ExoPlayer 2.11.2 and newer.
adsContainer
. This is to update with ExoPlayer 2.10.3.Config
construction now allow to pass Context
, and creating new Config
with Context
is recommended way.Some other changes may require migration effort, please feel free to create Github Issues.
This release is a middle-stage release to insist the full release of 3.7.0-2010005.
This alpha release contains the following significant changes:
ToroPlayerHelper
and Playable
interface now have setPlaybackInfo
method to support manual PlaybackInfo
setup. Default implementation classes are updated with this change.[Update] Update to ExoPlayer 2.8.4, Android 28 and Support Libraries 28, Android Studio 3.3 RC2.
[Update] Add onFirstFrameRendered()
to ToroPlayer.EventListener. The method is called when the video is first rendered to the View. This is a signal to the client to hide the thumbnail view for example. Implementation of Helper class is responsible for calling this callback. When used with MediaPlayer
this will only called on Android 17 and above.
[Update] Add CopyOnWriteArraySet implementation for listeners of ToroPlayer.
[Update] toro_exo_player_view
has a change in layout structure: the ProgressBar
is brought to the front, in front of exo_overlay
FrameLayout.
[Change/Breaking] ToroPlayerHelper#initialize(Container, PlaybackInfo)
is now final. Any implementation that override this method should be updated. The recommended way is to override the ToroPlayerHelper#initialize(PlaybackInfo)
only.
[Demo App] Better build config for app module. Proguard is included to demonstrate real life scenario. APK of this demo is included in the release tag.
Fix a bug that allow ExoPlayer instance to reuse VolumeInfo of a Player for other Player.
Detailed release note can be found in CHANGELOG.md
Article about this can be found here: introduce to Toro 3.6.0.2802
README: 3.5.2 is identical to 3.5.0, but to fix the bad artifact caused by gradle-maven issue (though there is a work around and I applied that to fix it in 3.5.2). Sorry for the inconvenience.
TL,DR: From Toro 3.5.0, client can actively prepare a PlaybackInfo
for ToroPlayer
by its order, using the newly added Container$Initializer
interface.
Custom initial PlaybackInfo sample:
container.setPlayerInitializer(order -> {
VolumeInfo volumeInfo = new VolumeInfo(true, 0.75f); // mute by default, but will be 0.75 when un-mute
return new PlaybackInfo(INDEX_UNSET, TIME_UNSET, volumeInfo);
});
Toro is also updated with improved PlaybackInfo in-memory caching mechanism, giving client better performance and correctness.
DETAILS
Toro is now developed using Android Studio 3.2
ExoPlayer extension now depends on ExoPlayer 2.7.3. (2.8.0 is a breaking change and will be support in next major release).
ToroPlayer:
ToroPlayer#initialize(Container, PlaybackInfo)
now has non-null PlaybackInfo (was null-able).ToroPlayerHelper#initialize(Container, PlaybackInfo)
now has non-null PlaybackInfo (was null-able).ToroPlayerHelper#initialize(PlaybackInfo)
now has non-null PlaybackInfo (was null-able).PlaybackInfo:
PlaybackInfo
has been updated with VolumeInfo
as a field.PlaybackInfo#SCRAP
object, which is a default, trivial static instance of PlaybackInfo. This instance should be used only to mark a player as un-initialized.Container:
Container#getLatestPlaybackInfos()
as a utility method so that client can get current playback info of all possible players at any time.Container$Initializer
interface. This interface, when set, will request client to initialize the PlaybackInfo
for a ToroPlayer
by its order, via Initializer#initPlaybackInfo(int)
. Default implementation return a trivial PlaybackInfo
.ExoPlayer extension:
Playable$EventListeners
now extends a HashSet
instead of ArrayList
, to guarantee the uniqueness of listener to be added by its hash value.Add RemoveIn
annotation so that user of Toro would know when a deprecated item will be removed.
Some internal methods are changed to final, other improvements and also deprecated class(es) are removed.
TL,DR: From Toro 3.5.0, client can actively prepare a PlaybackInfo
for ToroPlayer
by its order, using the newly added Container$Initializer
interface.
Custom initial PlaybackInfo sample:
container.setPlayerInitializer(order -> {
VolumeInfo volumeInfo = new VolumeInfo(true, 0.75f); // mute by default, but will be 0.75 when un-mute
return new PlaybackInfo(INDEX_UNSET, TIME_UNSET, volumeInfo);
});
Toro is also updated with improved PlaybackInfo in-memory caching mechanism, giving client better performance and correctness.
DETAILS
Toro is now developed using Android Studio 3.2
ExoPlayer extension now depends on ExoPlayer 2.7.3. (2.8.0 is a breaking change and will be support in next major release).
ToroPlayer:
ToroPlayer#initialize(Container, PlaybackInfo)
now has non-null PlaybackInfo (was null-able).ToroPlayerHelper#initialize(Container, PlaybackInfo)
now has non-null PlaybackInfo (was null-able).ToroPlayerHelper#initialize(PlaybackInfo)
now has non-null PlaybackInfo (was null-able).PlaybackInfo:
PlaybackInfo
has been updated with VolumeInfo
as a field.PlaybackInfo#SCRAP
object, which is a default, trivial static instance of PlaybackInfo. This instance should be used only to mark a player as un-initialized.Container:
Container#getLatestPlaybackInfos()
as a utility method so that client can get current playback info of all possible players at any time.Container$Initializer
interface. This interface, when set, will request client to initialize the PlaybackInfo
for a ToroPlayer
by its order, via Initializer#initPlaybackInfo(int)
. Default implementation return a trivial PlaybackInfo
.ExoPlayer extension:
Playable$EventListeners
now extends a HashSet
instead of ArrayList
, to guarantee the uniqueness of listener to be added by its hash value.Add RemoveIn
annotation so that user of Toro would know when a deprecated item will be removed.
Some internal methods are changed to final, other improvements and also deprecated class(es) are removed.
Toro 3.4.2 and above will be developed by Android Studio 3.1.0+, and maybe kotlin as well.
Development
gradle.properties-sample
and some internal change so contributor can start forking and contributing more easily.toro-core
Container
is used in CoordinatorLayout
with other Views, using Behavior
. Detail can be found on README.ToroUtil#wrapParamBehavior()
to help shorten the setup of new Behavior
above.VolumeInfo
for a tailored volume setup. It holds the 'mute' status as well as the actual volume value when the playback is unmuted.ToroPlayer$OnVolumeChangeListener
that listens to the change of internal VolumeInfo
. Instance of this interface is setup by ToroPlayerHelper
and its variants.Container
will no longer start a delayed playback if the scroll is not idled.toro-exoplayer
Config
now accepts an array of DrmSessionManager
s instead of a single DrmSessionManager
. This is an experiment.Playable#setParameters()
and Playable#getParameters
to match ExoPlayer behaviour.ToroExoPlayer
which extends SimpleExoPlayer
and provides the ability to work with VolumeInfo
.Playable
and default implementations are updated to work with VolumeInfo
.toro-mopub
PlayerView
and ToroControlView
that combines ExoPlayer r2.4.4 implementation with some fixes from ExoPlayer 2.7.0.Playable#setParameters()
and Playable#getParameters
to match ExoPlayer behaviour.ToroExoPlayer
which extends SimpleExoPlayer
and provides the ability to work with VolumeInfo
.Playable
and default implementations are updated to work with VolumeInfo
.VolumeInfo
.Others: minor performance improvement update.
Detail implementation and suggested usage can be found on demo applications.
ExoCreator
and MediaSourceBuilder
now requires the Uri extension as option, to deal with the case that actual Url doesn't end with file extension. Client should pass expected media type so that ExoPlayer can build suitable MediaSource instances. As a result, ExoPlayerViewHelper
adds addition constructor to support optional media type extension.