From d272a86f2096dac108a0b530df9f40774edcdd8b Mon Sep 17 00:00:00 2001 From: Olivier Bouillet <62574056+freeboub@users.noreply.github.com> Date: Mon, 20 May 2024 15:36:54 +0200 Subject: [PATCH] Fix(android): allow to select tracks with exceeded capabilities for more flexibility (#3791) * perf: ensure we do not provide callback to native if no callback provided from app * chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size * chore: improve issue template * fix(android): avoid video view flickering at playback startup * fix: allow to select Exceeded Constraints tracks for more playback flexibilities --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 2d505e13..64de3f15 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1978,6 +1978,9 @@ public class ReactExoplayerView extends FrameLayout implements DefaultTrackSelector.Parameters selectionParameters = trackSelector.getParameters() .buildUpon() + .setExceedAudioConstraintsIfNecessary(true) + .setExceedRendererCapabilitiesIfNecessary(true) + .setExceedVideoConstraintsIfNecessary(true) .setRendererDisabled(rendererIndex, false) .clearOverridesOfType(selectionOverride.getType()) .addOverride(selectionOverride)