public enum ResizeMode : Equatable
Describes how video content is scaled to fit the player bounds.
This is a semantic, engine-agnostic abstraction over AVLayerVideoGravity.
public enum ResizeMode : Equatable
Describes how video content is scaled to fit the player bounds.
This is a semantic, engine-agnostic abstraction over AVLayerVideoGravity.
Preserve the video’s aspect ratio and fit it within the bounds, adding
black bars (letterbox/pillarbox) where the aspect ratios differ.
Maps to AVLayerVideoGravity.resizeAspect.
Swift
case fit
Preserve the video’s aspect ratio and fill the bounds, cropping the
overflowing edges. Maps to AVLayerVideoGravity.resizeAspectFill.
Swift
case fill
Stretch the video to fill the bounds, ignoring the aspect ratio.
Maps to AVLayerVideoGravity.resize.
Swift
case stretch
The AVLayerVideoGravity this resize mode corresponds to.
Swift
var videoGravity: AVLayerVideoGravity { get }
Creates a ResizeMode from an AVLayerVideoGravity.
Any unrecognised gravity falls back to fit.
Swift
init(videoGravity: AVLayerVideoGravity)