Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: toggling muted prop causes full rerender on RN 0.76.0 #4261

Closed
evoactivity opened this issue Oct 28, 2024 · 14 comments · Fixed by #4302
Closed

[BUG]: toggling muted prop causes full rerender on RN 0.76.0 #4261

evoactivity opened this issue Oct 28, 2024 · 14 comments · Fixed by #4302
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: Android Repro Provided

Comments

@evoactivity
Copy link
Contributor

evoactivity commented Oct 28, 2024

Version

6.7.0

What platforms are you having the problem on?

Android TV

System Version

12

On what device are you experiencing the issue?

Simulator

Architecture

New architecture with interop layer

What happened?

Toggling the muted prop causes the whole component to rerender and start the video again.

Downgrading RN back to 0.75.2 resolves the issue.

Reproduction Link

No response

Reproduction

Toggle the muted prop

Copy link

github-actions bot commented Oct 28, 2024

Previous bot comment (click to expand)
Previous bot comment (click to expand)

Thank you for your bug report. We will review it and get back to you if we need more information.

@evoactivity evoactivity changed the title [BUG]: toggling muted prop causes full rerender [BUG]: toggling muted prop causes full rerender on RN 0.76.0 Oct 28, 2024
Copy link

github-actions bot commented Oct 28, 2024

Previous bot comment (click to expand)

Thank you for your bug report. We will review it and get back to you if we need more information.

Copy link

Thank you for your bug report. We will review it and get back to you if we need more information.

@KrzysztofMoch
Copy link
Member

Thanks for report, it's probably Interop Layer stuff - I am little busy right now but will you know once I check it

@felipegmg
Copy link

felipegmg commented Oct 31, 2024

+1, subscribing. When I change the pause prop using state changing approach, it is causing the re-render behavior too. When I use a pause and resume methods, the video not re-render.

@felipegmg
Copy link

I just noticed a certain pattern regarding component rendering. It happens when any property coming from a state is modified (e.g.: paused, rate, selectedTextTrack, muted...)

@felipegmg
Copy link

@evoactivity any solution?

@evoactivity
Copy link
Contributor Author

@felipegmg I've just downgraded back to 0.75. If I get some time before @KrzysztofMoch has a chance, I'll dig into the problem more indepth but I feel like it might need proper support for the new architecture.

@felipegmg
Copy link

@evoactivity, for me it is impossible to downgrade. As I use the paused, muted, rate properties, I will use the ref object and other third-party libraries to manipulate these values. Anyway, thanks for the answer. Good job!

@evoactivity
Copy link
Contributor Author

@felipegmg I don't understand why using those properties would stop you downgrading react native? Or trying without new architecture?

@freeboub
Copy link
Collaborator

freeboub commented Nov 8, 2024

@evoactivity @felipegmg can you confirm that you use bufferConfig prop ? Just to confirm something on my side

@felipegmg
Copy link

YEEES! And when I remove those props, the refresh not happen! Any solution/workaround to use bufferConfig and avoid this refresh? Thanks!

@freeboub
Copy link
Collaborator

This patch shall be OK for a quick workaround if you don't use cache on android.
In fact I already identify these lines as problematic and tracked the change to do here: #2693

BufferConfig is the last remaining one...

diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
index 1246d9fd..7d4c55b8 100644
--- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
+++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
@@ -2373,8 +2373,6 @@ public class ReactExoplayerView extends FrameLayout implements
         } else {
             useCache = false;
         }
-        releasePlayer();
-        initializePlayer();
     }
 
     @Override

@freeboub freeboub added Accepted Issue is confirmed and accepted by maintainers team and removed Waiting for Review labels Nov 12, 2024
@freeboub
Copy link
Collaborator

I finally provide the good patch ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: Android Repro Provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants