UZPlayer

Undocumented

  • Load and play a videoId

    Declaration

    Swift

    open func loadVideo(entityId: String, completionBlock:((_ linkPlays: [UZVideoLinkPlay]?, _ error: Error?) -> Void)? = nil)

    Parameters

    entityId

    id of video

    completionBlock

    callback block with [UZVideoLinkPlay] or Error

  • Play an UZVideoItem

    Declaration

    Swift

    open func loadVideo(_ video: UZVideoItem, completionBlock:((_ linkPlays: [UZVideoLinkPlay]?, _ error: Error?) -> Void)? = nil)

    Parameters

    video

    UZVideoItem

    completionBlock

    callback block with [UZVideoLinkPlay] or Error

  • Load and play a playlist

    Declaration

    Swift

    open func loadPlaylist(metadataId: String, page: Int = 0, limit: Int = 20, playIndex: Int = 0, completionBlock:((_ playlist: [UZVideoItem]?, _ pagination: UZPagination, _ error: Error?) -> Void)? = nil)

    Parameters

    metadataId

    playlist id

    page

    pagination, start from 0

    limit

    limit item

    playIndex

    index of item to start playing, set -1 to disable auto start

    completionBlock

    callback block with [UZVideoItem], pagination info, or Error

  • Undocumented

    Declaration

    Swift

    open func loadConfigId(configId: String, completionBlock: ((UZThemeConfig?, Error?) -> Void)? = nil)
  • Set video resource

    Declaration

    Swift

    open func setResource(resource: UZPlayerResource, definitionIndex: Int = 0)

    Parameters

    resource

    media resource

    definitionIndex

    starting definition index, default start with the first definition

  • Undocumented

    Declaration

    Swift

    open func playIfApplicable()
  • Undocumented

    Declaration

    Swift

    open func play()
  • Select subtitle track

    Declaration

    Swift

    open func selectSubtitle(index: Int?)

    Parameters

    index

    index of subtitle track, nil for turning off, -1 for default track

  • Select audio track

    Declaration

    Swift

    open func selectAudio(index: Int?)

    Parameters

    index

    index of audio track, nil for turning off, -1 for default audio track

  • Select media selection option

    Declaration

    Swift

    open func selectMediaOption(option: AVMediaCharacteristic, index: Int?)

    Parameters

    index

    index of media selection, nil for turning off, -1 for default option

  • 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(allowAutoPlay allow: Bool = false)

    Parameters

    allow

    should allow to response autoPlay function

  • Seek to time

    Declaration

    Swift

    open func seek(to interval: TimeInterval, completion: (() -> Void)? = nil)

    Parameters

    to

    target time

  • Seek offset

    Declaration

    Swift

    open func seek(offset: TimeInterval, completion: (() -> Void)? = nil)

    Parameters

    offset

    offset from current time

  • Undocumented

    Declaration

    Swift

    open func nextVideo()
  • Undocumented

    Declaration

    Swift

    open func previousVideo()
  • Undocumented

    Declaration

    Swift

    open func togglePiP()
  • Undocumented

    Declaration

    Swift

    open func switchVideoDefinition(_ linkplay: UZVideoLinkPlay)
  • Undocumented

    Declaration

    Swift

    public func adsLoader(_ loader: IMAAdsLoader!, adsLoadedWith adsLoadedData: IMAAdsLoadedData!)
  • Undocumented

    Declaration

    Swift

    public func adsLoader(_ loader: IMAAdsLoader!, failedWith adErrorData: IMAAdLoadingErrorData!)