Subtitles do not take videoGravity in to consideration
| Originator: | thomas.panis | ||
| Number: | rdar://24884955 | Date Originated: | 29-Feb-2016 02:47 PM |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | |
| Classification: | Reproducible: | Always |
Summary:
To make the video in an AVPlayerLayer fullscreen you change the videoGravity property.
- (void)setVideoFillMode:(NSString *)fillMode
{
_videoFillMode = fillMode;
AVPlayerLayer *playerLayer = (AVPlayerLayer*)[self layer];
playerLayer.videoGravity = fillMode;
}
// This transition is animated
- (void)toggleMediaPlayerZoom
{
[UIView beginAnimations:@"movieZoom" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
if (self.mPlaybackView.videoFillMode == AVLayerVideoGravityResizeAspect) {
self.mPlaybackView.videoFillMode = AVLayerVideoGravityResizeAspectFill;
} else {
self.mPlaybackView.videoFillMode = AVLayerVideoGravityResizeAspect;
}
[UIView setAnimationDuration:0.5];
[UIView commitAnimations];
}
But the subtitle (layer) does not take this property into consideration.
And will remain at the initial position after changing the videoGravity.
Steps to Reproduce:
Start a video with and make sure the subtitles are active.
Now change the videoGravity.
You will see the video to go fullscreen but the subtitle will remain where they were.
Expected Results:
The subtitles should scale together with the video.
e.g. remain at the bottom and increase font size.
Actual Results:
The subtitle remain where they were.
e.g. in the center with same font size.
Version:
iOS 9.2.1
Notes:
It would be useful if there was a method with which you could influence the subtitles.
e.g. when you want the subtitle to remain visible so that they can be put higher or lower depending if the UI is visible or not.
Configuration:
iPhone 6 Plus
Attachments:
'subtiles in wrong position.mov' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!