Pick the fix
Swiping between videos stutters and memory keeps growing. Best design?
Hint 1 of 1
How many players are really needed at once?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Reuse a pool of about three AVPlayers, preload the next item, and play only the most visible cell
Correct. Fixed memory, and the next video is ready.
Why not the others?
- B Create a new AVPlayer for every cell. That's expensive and grows memory.
- C Preload every video in the feed. It wastes bandwidth and memory.
- D Decode videos to images on the main thread. It blocks scrolling.