Search code examples
iosavfoundationavplayeravplayerlayer

AVPlayer stretches the end of a HLS video


When AVPlayer reaches the end of the video (for an HTTP live stream), the last frame stretches to fill the view. How do I get around this stretching? For instance, consider that the video was recorded in portrait mode. On a smaller view, the video will be boxed (with black borders). This is fine, until the player reaches the end of the stream. The last frame then stretches to fill the view until the player restarts.

Any ideas on how to stop this from happening?

EDIT: see my answer below. If anyone has any suggestions as to what a decent workaround would be, I would still be willing to award the bounty for that.


Solution

  • EDIT: This has been fixed as of iOS 8.