you-apps / RecordYou

Privacy focused recorder app built with MD3
https://you-apps.net
GNU General Public License v3.0
750 stars 34 forks source link

Fix Exoplayer Memory Leak #75

Closed SuhasDissa closed 1 year ago

SuhasDissa commented 1 year ago

Fixed a bug that caused created multiple ExoPlayer instances during each Screen composition. (Cause the phone to freeze if I keep the video view open for too long)

Its quite hard to see the problem. Problem becomes more noticeable when using exoPlayer.play() which plays the video in background but doesn't update the UI. (obviously because it affects a separate invisible instance of the player) and also exoPlayer.stop() doesn't actually stop the playing video.