[iOS] Player sometimes keeps seeking after view is unmounted
See original GitHub issueThis happens on remote video URLs.
Reproduction:
- Create Video player with remote video URL (https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4)
- Make it play (at this point you’ll notice an activity indicator show up at the top left in your status bar, which indicates that it is buffering the video)
- Unmount the Video player by either navigating away or change a state variable that causes the player to not show
- The activity indicator at the top left in the status bar will keep spinning (it should disappear)
I think this happens when the network request hasn’t finished responding and therefore the AVPlayerItem
is stuck in seeking mode. I think that in the removeFromSuperview
lifecycle, we need to call cancelPendingSeeks
on the AVPlayerItem
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Camera is still active after unmounting · Issue #905 - GitHub
We noticed that the Camera is still streaming frames even after the component is unmounted. This is made apparent by the green dot...
Read more >React useEffect causing: Can't perform a React state update ...
If the component updates it's state after it has been unmounted from the DOM, this is an indication that there could be a...
Read more >React: Stop checking if your component is mounted - Medium
This article will provide solutions to the “Can't perform a React state update on an unmounted component” warning and why a call to...
Read more >Apple Style Guide
Writers, editors, and developers can use this document as a guide to writing style, usage, and Apple product terminology. Writers and editors should ......
Read more >Avoid Memory Leak With React SetState On An Unmounted ...
Specifically, calling setState() in an unmounted component means that your app is still holding a reference to the component after the component ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, but is this going to blow up memory by pausing w/o unmounting. This seems like a serious issue if so.
Experiencing the same here. I’m not quite sure yet what isn’t unmounting but there is a memory leak for sure after a video is played.