RNVideo in overlay prevents the componentDidUnmount from being triggered

オープン
#8,247 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
react-native
領域
mobile

調査の方向性

まず、react-native-videoコンポーネントを含むOverlayで問題を再現し、次にoverlayのdismissおよびunmountの動作を調査します。Overlayをdismissするとコンポーネントのcleanupが実行され、動画または音声がバックグラウンドで再生され続けなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
MDX
スター
13.2k
フォーク
2.6k
平均マージ
3時間 21分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wix/react-native-navigation のほかの issue

wix/react-native-navigation の issue をすべて見る

似ている issue

Mobile Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。