VideoPlayerView
public class VideoPlayerView : UIViewAn object that displays a single video asset or a playlist of video assets in your interface.
- 
                  
                  A value that specifies how the video is displayed within the view’s bounds. DeclarationSwift open var gravity: Richi.Gravity { get set }
- 
                  
                  Determines if the video should autoplay DeclarationSwift open var autoplay: Bool { get set }
- 
                  
                  The audio playback volume for the player. DeclarationSwift open var volume: Float { get set }
- 
                  
                  A Boolean value that indicates whether the audio output of the player is muted. DeclarationSwift open var isMuted: Bool { get set }
- 
                  
                  A Boolean value that indicates whether video playback prevents display and device sleep. DeclarationSwift @available(macOS 10.14, iOS 12.0, tvOS 12.0, *) open var preventsDisplaySleepDuringPlayback: Bool { get set }
- 
                  
                  A boolean value that indicates whether video playback is playing DeclarationSwift open var isPlaying: Bool { get set }
- 
                  
                  The current playback rate DeclarationSwift open var rate: Float { get set }
- 
                  
                  The action to perform when the current player item has finished playing. DeclarationSwift open var actionAtEnd: Richi.EndAction { get set }
- 
                  
                  Controls if playback is paused when the application is no longer active. This is because of temporary interruptions such as incoming phone calls, messages or when the app is backgrounded by the user. DeclarationSwift open var pauseWhenResigningActive: Bool { get set }
- 
                  
                  Controls if playback is paused when the application enters the background. This is triggered by the user sending the app to the background or locking the device. DeclarationSwift open var pauseWhenEnteringBackground: Bool { get set }
- 
                  
                  Controls if playback is resumed when the application has become active. Playback will be resumed only if the player was paused because of some temporary interruption. DeclarationSwift open var resumeWhenBecomingActive: Bool { get set }
- 
                  
                  Controls if playback is resumed when the application is about to enter the foreground DeclarationSwift open var resumeWhenEnteringForeground: Bool { get set }
- 
                  
                  The current asset DeclarationSwift open var asset: Richi.Asset? { get set }
- 
                  
                  Current playback state of the Player DeclarationSwift open var playbackState: Richi.PlaybackState { get }
- 
                  
                  Current buffering state of the Player DeclarationSwift open var bufferingState: Richi.BufferingState { get }
- 
                  
                  The size of the current video asset. DeclarationSwift open var videoSize: CGSize { get }
- 
                  
                  Maximum duration of playback. DeclarationSwift open var duration: TimeInterval { get }
- 
                  
                  Media playback’s current time. DeclarationSwift open var currentTime: CMTime { get }
- 
                  
                  Indicates the desired limit of network bandwidth consumption for this item. DeclarationSwift open var preferredPeakBitRate: Double { get set }
- 
                  
                  Indicates a preferred upper limit on the resolution of the video to be downloaded. DeclarationSwift @available(macOS 10.13, iOS 11.0, tvOS 11.0, *) open var preferredMaximumResolution: CGSize { get set }
- 
                  
                  Media playback’s current time interval in seconds. DeclarationSwift open var currentDuration: TimeInterval { get }
- 
                  
                  The object that acts as the delegate of the video player view DeclarationSwift open weak var delegate: VideoPlayerDelegate? { get set }
- 
                  
                  The object that acts as the time delegate of the video player view DeclarationSwift open weak var timeDelegate: MediaPlayerTimeDelegate? { get set }
- 
                  
                  The time interval at which time observers should notify the progress of the player’s current time. DeclarationSwift open var timeObserverInterval: TimeInterval { get set }
- 
                  
                  The underlying AVPlayer object DeclarationSwift open var player: AVPlayer { get set }
- 
                  
                  Undocumented DeclarationSwift open internal(set) lazy var videoPlayer: VideoPlayer { get set }
- 
                  
                  The underlying AVPlayerItem object currently playing DeclarationSwift open var playerItem: AVPlayerItem? { get }
- 
                  
                  Undocumented DeclarationSwift public override var contentMode: UIView.ContentMode { get set }
- 
                  
                  Initializes and returns a newly allocated player view object with a zero rect frame. DeclarationSwift public init()
- 
                  
                  Initializes and returns a newly allocated player view object from the specified coder. DeclarationSwift public required init?(coder: NSCoder)ParameterscoderThe coder object 
- 
                  
                  Creates a publisher that emits an event when specified times are traversed during normal playback. DeclarationSwift @available(macOS 10.15, iOS 13.0, tvOS 13.0, *) open func boundaryTimePublisher(forTimes times: [CMTime]) -> AnyPublisher<Void, Never>ParameterstimesAn array of CMTime values representing the times at which to emit events. Return ValueA publisher that emits events when traversing specific times. 
- 
                  
                  Creates a publisher that periodically emits the changing time of the current playback. DeclarationSwift @available(macOS 10.15, iOS 13.0, tvOS 13.0, *) open func periodicTimePublisher(forInterval interval: CMTime) -> AnyPublisher<CMTime, Never>ParametersintervalThe time interval at which the system invokes the block during normal playback, according to progress of the player’s current time. Return ValueA publisher that emits the changing time. 
- 
                  
                  Loads the given asset and prepares the player. With autoplay enabled, the asset will be played automatically as soon as the player is ready. DeclarationSwift open func load(asset: Richi.Asset)ParametersassetThe asset to be played 
- 
                  
                  Plays the current asset from the beginning DeclarationSwift open func playFromBeginning()
- 
                  
                  Continues playing the current asset if shouldPlayistrue, pauses playback otherwise.DeclarationSwift open func play(_ shouldPlay: Bool = true)ParametersshouldPlayIndicates if the player should play or pause 
- 
                  
                  Pauses playback of the current asset DeclarationSwift open func pause()
- 
                  
                  Stops playback of the current asset. DeclarationSwift open func stop()
- 
                  
                  Sets the current playback time to the specified time and executes the specified block when the seek operation completes or is interrupted. DeclarationSwift open func seek(to time: CMTime, completionHandler: ((Bool) -> Void)? = nil)ParameterstimeThe time to which to seek. completionHandlerThe block to invoke when the seek operation has either been completed or been interrupted. 
- 
                  
                  Sets the current playback time within a specified time bound and invokes the specified block when the seek operation completes or is interrupted. DeclarationSwift open func seek( to time: CMTime, toleranceBefore: CMTime, toleranceAfter: CMTime, completionHandler: ((Bool) -> Void)? = nil )ParameterstimeThe time to which to seek. toleranceBeforeThe tolerance allowed before time. toleranceAfterThe tolerance allowed after time. completionHandlerThe block to invoke when the seek operation has either been completed or been interrupted. 
- 
                  
                  Captures a snapshot of the current media at the specified time. If time is nil, the current time will be used. DeclarationSwift open func snapshot(at time: CMTime? = nil, completion: @escaping (_ image: UIImage?, _ error: Error?) -> Void)ParameterstimeThe time at which to capture the snapshot completionThe block to invoke when the snapshot completes. Provides the image if no error occured. 
- 
                  
                  Requests the invocation of a block when specified times are traversed during normal playback. DeclarationSwift open func addBoundaryTimeObserver( forTimes times: [CMTime], queue: DispatchQueue? = nil, using block: @escaping () -> Void ) -> AnyParameterstimesAn array of CMTime values representing the times at which to invoke block. queueA serial queue onto which block should be enqueued. Passing a concurrent queue is not supported and will result in undefined behavior. If you pass nil, the main queue is used. blockThe block to be invoked when any of the times in times is crossed during normal playback. Return ValueAn opaque object that you pass as the argument to removeTimeObserver(_:) to stop observation. 
- 
                  
                  Requests the periodic invocation of a given block during playback to report changing time. DeclarationSwift open func addPeriodicTimeObserver( forInterval interval: CMTime, queue: DispatchQueue? = nil, using block: @escaping (CMTime) -> Void ) -> AnyParametersintervalThe time interval at which the system invokes the block during normal playback, according to progress of the player’s current time. queueThe dispatch queue on which the system calls the block. Passing a concurrent queue isn’t supported and results in undefined behavior. If you pass nil, the system uses the main queue. blockThe block that the system periodically invokes. Return ValueAn opaque object that you pass as the argument to removeTimeObserver(_:) to cancel observation. 
- 
                  
                  Cancels a previously registered periodic or boundary time observer. DeclarationSwift open func removeTimeObserver(_ observer: Any)ParametersobserverAn object returned by a previous call to addPeriodicTimeObserver(forInterval:queue:using:) or addBoundaryTimeObserver(forTimes:queue:using:). 
 View on GitHub
            View on GitHub
           VideoPlayerView Class Reference
      VideoPlayerView Class Reference