Enforce max gif playback using unreserved count from exo pool.

This commit is contained in:
Alex Hart 2022-10-28 15:17:05 -03:00 committed by Cody Henthorne
parent c1ff2aeeff
commit 6999d1fbf1

View file

@ -25,10 +25,10 @@ public final class GiphyMp4PlaybackPolicy {
} }
public static int maxSimultaneousPlaybackInSearchResults() { public static int maxSimultaneousPlaybackInSearchResults() {
return 12; return ApplicationDependencies.getExoPlayerPool().getPoolStats().getMaxUnreserved();
} }
public static int maxSimultaneousPlaybackInConversation() { public static int maxSimultaneousPlaybackInConversation() {
return 4; return ApplicationDependencies.getExoPlayerPool().getPoolStats().getMaxUnreserved() / 3;
} }
} }