UZPlayer
open class UZPlayer : UIView
extension UZPlayer: UZPlayerControlViewDelegate
extension UZPlayer: AVPictureInPictureControllerDelegate
Undocumented
-
Undocumented
Declaration
Swift
public static let ShowAirPlayDeviceListNotification: Notification.Name -
Undocumented
Declaration
Swift
open weak var delegate: UZPlayerDelegate? -
Undocumented
Declaration
Swift
public var backBlock: ((Bool) -> Void)? -
Undocumented
Declaration
Swift
public var videoChangedBlock: ((UZVideoItem) -> Void)? -
Undocumented
Declaration
Swift
public var fullscreenBlock: ((Bool) -> Void)? -
Undocumented
Declaration
Swift
public var buttonSelectionBlock: ((UIButton) -> Void)? -
Undocumented
Declaration
Swift
public var playTimeDidChange: ((TimeInterval, TimeInterval) -> Void)? -
Undocumented
Declaration
Swift
public var playStateDidChange: ((Bool) -> Void)? -
Undocumented
Declaration
Swift
public var videoGravity: AVLayerVideoGravity { get set } -
Undocumented
Declaration
Swift
public var aspectRatio: UZPlayerAspectRatio { get set } -
Undocumented
Declaration
Swift
public var isPlaying: Bool { get } -
Undocumented
Declaration
Swift
public var avPlayer: AVPlayer? { get } -
Undocumented
Declaration
Swift
public var subtitleOptions: [AVMediaSelectionOption]? { get } -
Undocumented
Declaration
Swift
public var audioOptions: [AVMediaSelectionOption]? { get } -
Undocumented
Declaration
Swift
public var playlist: [UZVideoItem]? { get set } -
Undocumented
Declaration
Swift
public var currentVideoIndex: Int { get set } -
Undocumented
Declaration
Swift
public internal(set) var currentVideo: UZVideoItem? { get set } -
Undocumented
Declaration
Swift
public internal(set) var currentLinkPlay: UZVideoLinkPlay? -
Undocumented
Declaration
Swift
public var themeConfig: UZPlayerConfig? { get set } -
Undocumented
Declaration
Swift
public var shouldAutoPlay: Bool -
Undocumented
Declaration
Swift
public var shouldShowsControlViewAfterStoppingPiP: Bool -
Undocumented
Declaration
Swift
public var autoTryNextDefinitionIfError: Bool -
Undocumented
Declaration
Swift
public var controlView: UZPlayerControlView! -
Undocumented
Declaration
Swift
public var liveEndedMessage: String -
Undocumented
Declaration
Swift
open var customControlView: UZPlayerControlView? { get set } -
Undocumented
Declaration
Swift
public var preferredForwardBufferDuration: TimeInterval { get set } -
Undocumented
Declaration
Swift
public internal(set) var resource: UZPlayerResource! { get set } -
Undocumented
Declaration
Swift
public internal(set) var currentDefinition: Int -
Undocumented
Declaration
Swift
public internal(set) var playerLayer: UZPlayerLayerView? -
Undocumented
Declaration
Swift
public internal(set) var totalDuration: TimeInterval -
Undocumented
Declaration
Swift
public internal(set) var currentPosition: TimeInterval -
Undocumented
Declaration
Swift
public internal(set) var isURLSet: Bool -
Undocumented
Declaration
Swift
public internal(set) var isSliderSliding: Bool -
Undocumented
Declaration
Swift
public internal(set) var isPauseByUser: Bool -
Undocumented
Declaration
Swift
public internal(set) var isPlayToTheEnd: Bool -
Undocumented
Declaration
Swift
public fileprivate(set) var isReplaying: Bool -
Undocumented
Declaration
Swift
public internal(set) var pictureInPictureController: AVPictureInPictureController? { get set } -
Undocumented
Declaration
Swift
public var autoPauseWhenInactive: Bool -
Undocumented
Declaration
Swift
public init() -
Undocumented
Declaration
Swift
public required init?(coder aDecoder: NSCoder) -
Undocumented
Declaration
Swift
public convenience init(customControlView: UZPlayerControlView?) -
Play a video with given URL
Declaration
Swift
open func loadVideo(url: URL, subtitleURLS: [URL]? = nil, isLive: Bool = false)Parameters
urlURL of linkplay
subtitleURLsURLs of subtitle if any
isLiveset
trueif it is a live video -
Play an
UZVideoItemDeclaration
Swift
open func loadVideo(_ video: UZVideoItem)Parameters
videoUZVideoItem
-
Undocumented
Declaration
Swift
open func playIfApplicable() -
Undocumented
Declaration
Swift
open func play() -
Stop and unload the player
Declaration
Swift
open func stop() -
Seek to 0.0 and replay the video
Declaration
Swift
open func replay() -
Pause
Declaration
Swift
open func pause() -
Seek to time
Declaration
Swift
open func seek(to interval: TimeInterval, completion: (() -> Void)? = nil)Parameters
totarget time
-
Seek offset
Declaration
Swift
open func seek(offset: TimeInterval, completion: (() -> Void)? = nil)Parameters
offsetoffset from current time
-
Undocumented
Declaration
Swift
open func switchVideoDefinition(_ linkplay: UZVideoLinkPlay) -
Undocumented
Declaration
Swift
public var isVisualizeInfoEnabled: Bool { get set }
-
Undocumented
Declaration
Swift
open func togglePiP()
-
Undocumented
Declaration
Swift
open func setupAudioCategory()
-
Undocumented
Declaration
Swift
@objc open func loadLiveViews() -
Undocumented
Declaration
Swift
open func loadLiveStatus(after interval: TimeInterval = 0) -
Undocumented
Declaration
Swift
open func showLiveEndedMessage() -
Seek to current time of live video
Declaration
Swift
open func seekToLive() -
Undocumented
Declaration
Swift
public func getCurrentLatency() -> TimeInterval -
Undocumented
Declaration
Swift
open func nextVideo() -
Undocumented
Declaration
Swift
open func previousVideo()
-
Select subtitle track
Declaration
Swift
open func selectSubtitle(index: Int?)Parameters
indexindex of subtitle track,
nilfor turning off,-1for default track -
Select audio track
Declaration
Swift
open func selectAudio(index: Int?)Parameters
indexindex of audio track,
nilfor turning off,-1for default audio track -
Select media selection option
Declaration
Swift
open func selectMediaOption(option: AVMediaCharacteristic, index: Int?)Parameters
indexindex of media selection,
nilfor turning off,-1for default option
-
Undocumented
Declaration
Swift
override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
-
Set video resource
Declaration
Swift
open func setResource(resource: UZPlayerResource, definitionIndex: Int = 0)Parameters
resourcemedia resource
definitionIndexstarting definition index, default start with the first definition
-
Undocumented
Declaration
Swift
override open func layoutSubviews()
-
Undocumented
Declaration
Swift
@objc open func showAirPlayDevicesSelection() -
Undocumented
Declaration
Swift
open func showCastingDeviceList()
-
Undocumented
Declaration
Swift
open func showShare(from view: UIView) -
Undocumented
Declaration
Swift
open func showQualitySelector() -
Undocumented
Declaration
Swift
open func showMediaOptionSelector()
-
Undocumented
Declaration
Swift
open func controlView(controlView: UZPlayerControlView, didChooseDefinition index: Int) -
Undocumented
Declaration
Swift
open func controlView(controlView: UZPlayerControlView, didSelectButton button: UIButton) -
Undocumented
Declaration
Swift
open func controlView(controlView: UZPlayerControlView, slider: UISlider, onSliderEvent event: UIControl.Event)
-
Undocumented
Declaration
Swift
open func player(player: UZPlayerLayerView, playerIsPlaying playing: Bool) -
Undocumented
Declaration
Swift
open func player(player: UZPlayerLayerView, loadedTimeDidChange loadedDuration: TimeInterval, totalDuration: TimeInterval) -
Undocumented
Declaration
Swift
open func player(player: UZPlayerLayerView, playerStateDidChange state: UZPlayerState) -
Undocumented
Declaration
Swift
open func player(player: UZPlayerLayerView, playTimeDidChange currentTime: TimeInterval, totalTime: TimeInterval) -
Undocumented
Declaration
Swift
open func player(player: UZPlayerLayerView, playerDidFailToPlayToEndTime error: Error?) -
Undocumented
Declaration
Swift
open func player(playerDidStall: UZPlayerLayerView) -
Undocumented
Declaration
Swift
open func player(playerRequiresSeekingToLive: UZPlayerLayerView)
-
Undocumented
Declaration
Swift
open func pictureInPictureControllerWillStartPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) -
Undocumented
Declaration
Swift
open func pictureInPictureControllerDidStartPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) -
Undocumented
Declaration
Swift
open func pictureInPictureControllerDidStopPictureInPicture(_ pictureInPictureController: AVPictureInPictureController)
UZPlayer Class Reference