Properties
The URLVideoPlayerView inherits some useful properties from its superclasses that can be used for a variety of actions
videoExportQuality: Celestial.VideoExportQuality?
Defines the quality at which downloaded videos will be exported and displayed.
default
will not download and display the video as-is
low
and medium
will apply appropriate compressions to provide a video with a smaller file size, at the cost of quality and resolution
resolution: CGSize?
The resolution of the video in pixel format (e.g. 1080 Width by 1980 Height for a vertical video or 9:16 format)
NOTE
: This will be nil or zero until the video is ready to play
aspectRatio: CGFloat?
The aspect ratio of the video represented as a double value
NOTE
: This will be nil or zero until the video is ready to play
public func requiredSizeFor(width: CGFloat) -> CGSize
Returns the size required to fit within the given width that would maintain the proper aspect ratio.
When combined with AVLayerVideoGravity.resizeAspect (The default setting for AVPlayerLayer)
this function can be
used to provide a self-sizing view that would prevent the video from cropping.