Issue: when the app is displaying a video (either welcome screen or buy nano scren) goes in the background and is then resumed, the video is sometimes blank.
This issue happens on both iOS and Android, especially.
This PR contains the only solution I could find to prevent this from happening, basically unmounting the video component when the app goes in the background and then remounting it when the app comes back in the foreground.
It is far from perfect and has a side effect of restarting the video, but I could not reproduce the issue anymore so I guess it does the job 🤷♂️ It's better than having a blank space where the video should be.
NB: I also changed the video player on Android from MediaPlayer to ExoPlayer (which is the recommended player for react-native-video). The reason we were using MediaPlayer is that with ExoPlayer it was stopping the media playing in other apps, but there is actually the prop disableFocus to prevent that from happening.
Type
Context
v3 pre-release
Parts of the app affected / Test plan
Onboarding welcome screen & "i don't have a Ledger" screen
Issue: when the app is displaying a video (either welcome screen or buy nano scren) goes in the background and is then resumed, the video is sometimes blank.
This issue happens on both iOS and Android, especially.
This PR contains the only solution I could find to prevent this from happening, basically unmounting the video component when the app goes in the background and then remounting it when the app comes back in the foreground.
It is far from perfect and has a side effect of restarting the video, but I could not reproduce the issue anymore so I guess it does the job 🤷♂️ It's better than having a blank space where the video should be.
NB: I also changed the video player on Android from MediaPlayer to ExoPlayer (which is the recommended player for react-native-video). The reason we were using MediaPlayer is that with ExoPlayer it was stopping the media playing in other apps, but there is actually the prop
disableFocus
to prevent that from happening.Type
Context
v3 pre-release
Parts of the app affected / Test plan
Onboarding welcome screen & "i don't have a Ledger" screen