AVPlayer seeking to a different point after app resume
- by CGuess
I have an AVPlayer, the video in it is ~2 seconds long. After the video plays, if the app goes to the background and reenters the foreground I need the video to still be shown exactly as it was when the app was exited.
The AVPlayer sticks around just fine, however when I reenter the app from the background the video appears to be seeked to the middle of the video. However, if I just play the video, it starts from the beginning, so it doesn't seem like it actually seeked and is just showing a preview image.
I've tried to auto-seek the video to the end on relaunch but nothing happens . Nothing I can figure out or find in the docs would describe this behavior.
Any tips on having the video launch either at the beginning or end?