Release 3.5.0 (2018/05/18)
3.5.0 (2018/05/18)
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:
PlaybackInfohas been updated withVolumeInfoas a field. - NEW: Add
PlaybackInfo#SCRAPobject, 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$Initializerinterface. This interface, when set, will request client to initialize thePlaybackInfofor aToroPlayerby its order, viaInitializer#initPlaybackInfo(int). Default implementation return a trivialPlaybackInfo.
- NEW: Add
-
ExoPlayer extension:
Playable$EventListenersnow extends aHashSetinstead ofArrayList, to guarantee the uniqueness of listener to be added by its hash value.
-
Add
RemoveInannotation 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.