Open andrewsexcellent opened 2 years ago
hi @kean - we'd love to hear your thoughts on this issue if you have a moment! it is a blocker for us, and ultimately will determine if we can use Nuke/NukeUI. Thanks so much for a great library!
The issue that I'm seeing is that if I show that view via a NavigationView more than 3 times, the mp4s no longer load and play.
Unfortunately, it's a known limitation. The number of players you can have at once on-screen is limited. The limit is not documented and depends on the platform. In general, expect to have about four players playing at once. So the app needs to be designed to work around that.
I don't think there are any known leaks in NukeUI. If you find them, I would appreciate if you could report them.
Hey kean, thanks for the reply!
We're going back and forth in a navigation stack, that should theoretically kill off the VideoPlayer views, but it doesn't seem like it is.
Surely it doesn't mean that you can only ever have 4 players play your mp4s and that's it?
You can have around four playing at the same time.
You can have around four playing at the same time.
Great, thanks for reiterating this point! Our concern is more that it seems the VideoPlayer views aren't being killed off when navigating in the stack. We aren't asking at all about the number playing at the same time -- but rather about player views persisting when they shouldn't be.
Hello,
First off - thanks for the effort on the library - really appreciate it!
In my project I'm using NukeUI and Introspect I have a view that uses about 10
LazyImage
s to download and show an mp4 and another piece of that view that responds to a sheet modifier that utilizes detents on iOS 15 via Introspect, as they're not yet in SwiftUI.The issue that I'm seeing is that if I show that view via a
NavigationView
more than 3 times, the mp4s no longer load and play.Additionally, inspecting the memory graph, shows that even if I navigate away from that view, there are about 60
LazyImage
andVideoPlayerView
sticking around in memory, which I assume is the crux of the issue.Commenting out the Introspect portion fixes the issue and everything works as expected, but I need it in my app for other things as well.
Now, this might very well be an Introspect issue and I'm raising an issue in that repo as well, but just wanted to see whether the maintainer here might have any insights into why this is happening.
Code that reproduces the issue
Tested on iOS 15.4.1 on iPhone 12 Pro Max, compiled with Xcode 13.3.1 (interestingly the simulator doesn't show the issue)
NukeUI version: 0.8.1 Introspect version: 0.1.4
Video of the issue:
https://user-images.githubusercontent.com/82413230/168490919-ee292d87-d8ed-4939-b278-138c6648d7e3.mov
Memory graph:
Thanks!