Release 3.5.2 (2018/05/21)
3.5.2 (2018/05/21)
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:
- NEW:
PlaybackInfo
has been updated withVolumeInfo
as a field. - NEW: Add
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.
- NEW:
-
Container:
- NEW: Add
Container#getLatestPlaybackInfos()
as a utility method so that client can get current playback info of all possible players at any time. - NEW: Add
Container$Initializer
interface. This interface, when set, will request client to initialize thePlaybackInfo
for aToroPlayer
by its order, viaInitializer#initPlaybackInfo(int)
. Default implementation return a trivialPlaybackInfo
.
- NEW: Add
-
ExoPlayer extension:
Playable$EventListeners
now extends aHashSet
instead ofArrayList
, 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.