RNVideo in overlay prevents the componentDidUnmount from being triggered

Aperta
#8,247 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
react-native
Ambito
mobile

Direzione di ricerca

Inizia riproducendo il problema con un Overlay contenente un componente react-native-video, quindi esamina il comportamento di chiusura e unmount dell’overlay. Il lavoro è completato quando la chiusura dell’overlay attiva la pulizia del componente e il video o l’audio non continua più a essere riprodotto in background.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

platform: iOS type: accepted/bug
What happened?

When showing a Overlay with a RNVideo component from react-native-video, the Video prevents the view from being unmounted on dismiss. I noticed this because my RNVideo was still playing in the background when I dismissed the overlay.

In other words, once you have a video playing, this code:

useEffect(() => {
  console.log('mounted');
  return () => {
    console.log('unmounted');
  };
}, []);

will only print mounted to the console, unmounted will never be called.

What was the expected behaviour?

I expect it to actually unmount like a normal Screen (push) does.

Was it tested on latest react-native-navigation?
  • I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!
  1. Show overlay with video
  2. Dismiss overlay
  3. Notice the overlay component still being "mounted" in native view hierarchy (video/audio still playing)
In what environment did this happen?

React Native Navigation version: 7.48.0
React Native version: 0.77
Has Fabric (React Native's new rendering system) enabled: (yes/no) no
Node version: 20
Device model: iPhone 17 Simulator
iOS version: 26

Lingua principale
MDX
Stelle
13.2k
Fork
2.6k
Merge medio
3h 21m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wix/react-native-navigation

Tutte le issue di wix/react-native-navigation

Issue simili

Altre issue su Mobile Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.