fix(android): fix leak caused by removing lifecycle listener too early (#3380)
* Fix lifecycle listener being removed too early
This commit is contained in:
parent
b3744f9b9f
commit
0c0f3174cb
@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
# [6.0.0-beta.1](https://github.com/react-native-video/react-native-video/compare/v6.0.0-beta.0...v6.0.0-beta.1) (WIP)
|
||||||
|
* **android:** fix leak caused by removing lifecycle listener too early ([#3380](https://github.com/react-native-video/react-native-video/pull/3380))
|
||||||
|
|
||||||
# [6.0.0-beta.0](https://github.com/react-native-video/react-native-video/compare/v6.0.0-alpha.11...v6.0.0-beta.0) (2023-11-18)
|
# [6.0.0-beta.0](https://github.com/react-native-video/react-native-video/compare/v6.0.0-alpha.11...v6.0.0-beta.0) (2023-11-18)
|
||||||
|
|
||||||
@ -56,7 +58,7 @@
|
|||||||
- iOS: Fix audio session category when not using the audioOutput prop
|
- iOS: Fix audio session category when not using the audioOutput prop
|
||||||
- iOS: implement onPlaybackStateChanged callback [#3307](https://github.com/react-native-video/react-native-video/pull/3307)
|
- iOS: implement onPlaybackStateChanged callback [#3307](https://github.com/react-native-video/react-native-video/pull/3307)
|
||||||
- iOS: remove false calls at onPlaybackRateChange [#3306](https://github.com/react-native-video/react-native-video/pull/3306)
|
- iOS: remove false calls at onPlaybackRateChange [#3306](https://github.com/react-native-video/react-native-video/pull/3306)
|
||||||
- iOS: audio does not work with headphones [#3284](https://github.com/react-native-video/react-native-video/pull/3284)
|
- iOS: audio does not work with headphones [#3284](https://github.com/react-native-video/react-native-video/pull/3284)
|
||||||
- iOS: Resuming video ad after closing the in-app browser on iOS [#3275](https://github.com/react-native-video/react-native-video/pull/3275)
|
- iOS: Resuming video ad after closing the in-app browser on iOS [#3275](https://github.com/react-native-video/react-native-video/pull/3275)
|
||||||
- iOS, Android: expose playback functions to ref [#3245](https://github.com/react-native-video/react-native-video/pull/3245)
|
- iOS, Android: expose playback functions to ref [#3245](https://github.com/react-native-video/react-native-video/pull/3245)
|
||||||
- tvOS: fix build: [#3276](https://github.com/react-native-video/react-native-video/pull/3276)
|
- tvOS: fix build: [#3276](https://github.com/react-native-video/react-native-video/pull/3276)
|
||||||
@ -387,4 +389,4 @@
|
|||||||
- Add cookie support for ExoPlayer [#922](https://github.com/react-native-community/react-native-video/pull/922)
|
- Add cookie support for ExoPlayer [#922](https://github.com/react-native-community/react-native-video/pull/922)
|
||||||
- Remove ExoPlayer onMetadata that wasn't being used [#1040](https://github.com/react-native-community/react-native-video/pull/1040)
|
- Remove ExoPlayer onMetadata that wasn't being used [#1040](https://github.com/react-native-community/react-native-video/pull/1040)
|
||||||
- Fix bug where setting the progress interval on iOS didn't work [#800](https://github.com/react-native-community/react-native-video/pull/800)
|
- Fix bug where setting the progress interval on iOS didn't work [#800](https://github.com/react-native-community/react-native-video/pull/800)
|
||||||
- Support setting the poster resize mode [#595](https://github.com/react-native-community/react-native-video/pull/595)
|
- Support setting the poster resize mode [#595](https://github.com/react-native-community/react-native-video/pull/595)
|
||||||
|
@ -349,6 +349,7 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
@Override
|
@Override
|
||||||
public void onHostDestroy() {
|
public void onHostDestroy() {
|
||||||
stopPlayback();
|
stopPlayback();
|
||||||
|
themedReactContext.removeLifecycleEventListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cleanUpResources() {
|
public void cleanUpResources() {
|
||||||
@ -881,7 +882,6 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
adsLoader = null;
|
adsLoader = null;
|
||||||
progressHandler.removeMessages(SHOW_PROGRESS);
|
progressHandler.removeMessages(SHOW_PROGRESS);
|
||||||
themedReactContext.removeLifecycleEventListener(this);
|
|
||||||
audioBecomingNoisyReceiver.removeListener();
|
audioBecomingNoisyReceiver.removeListener();
|
||||||
bandwidthMeter.removeEventListener(this);
|
bandwidthMeter.removeEventListener(this);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user