Subtitles are displayed in the wrong position when in portrait mode and videoGravity is AVLayerVideoGravityResizeAspectFill

Number:rdar://36579812 Date Originated:2018-01-17
Status:Open Resolved:
Product:iOS + SDK AVFoundation Product Version:11.2.2
Classification:Bug Reproducible:Always
When the following conditions are met, HLS streamed subtitles always appear in the middle of the screen instead of the bottom:
* Phone is in portrait mode
* Subtitles are enabled
* Video has a landscape aspect ratio (e.g. 16x9)
* AVPlayerLayer's videoGravity property is set to AVLayerVideoGravityResizeAspectFill

The preferred position to display the subtitles should be on the bottom of the screen, like in all other scenarios.

Steps to Reproduce:
1. Download and run the HLS Catalog sample app (
2. Click on 'Basic Stream'
3. Enable 'CC' Subtitles
4. Change the video gravity by clicking the second button on the top left

Expected Results:
Subtitles are displayed on the bottom of the screen.

Actual Results:
Subtitles are displayed in the middle of the screen. They are displayed in the same position as if the video gravity was still AVLayerVideoGravityResizeAspect.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!