Skip to main content

Additional functions

Video Functions

changeVideo(videoId: String,playerId:String) change the video and the player using the video Id and the player Id

changeVideo(videoModel: VPVideoModel, videoHeaders: HashMap<String, String>? = null) - Change video using VideoModel

changeVideo(videoId :String) - Change video using VideoId

changeVideo(vpModel :VPModel) - Change video and player using VPModel

changeVideo(videoModel: VPVideoModel, playerId: String) - Change video and player using VPVideoModel and player Id

getCurrentVideoSecond() - Returns current playing second

getCurrentProgress() - Returns current progress

isVideoAdPlaying() - Return Boolean of state if player is playing an ad

disableAds() - Disable all ads.

isVideoPlaying() - Return Boolean of state if video is playing

isVideoPaused() - Return Boolean of state if video is paused

setupPreBidAds(hostUrl:String = customHostUrl, accountID :String = accountId, configID: String = configId) - setup Ads using Prebid

Controls, Settings and Buttons Visibility

setControllerTimeout(isMax: Boolean) - Set Controllers Timeout

isAutoPlayEnabled() - Return Boolean of state if auto play is enabled

isSlidingPanelExpanded() - Return Boolean state if sliding up panel is expanded

arePlayerControlsVisible() - Return Boolean of state if player controls are opened

isSharePopupOpened() - Return Boolean of state if share dialog is open

removeConstrainedHeight() - Function to remove constrained height

setConstrainedHeight() - Function to set constrined height

openRelatedOverlay() - Open Playlist Overlay

closeRelatedOverlay() - Close Playlist Overlay

openSettings() - Open Settings Menu

closeSettings() - Close Settings Menu

closeSettingsAllowingStateLoss() - Close Settings Menu allowing state loss

showOpenFullScreenButton() - Show Open Full Screen Button

hideOpenFullScreenButton() - Hide Open Full Screen Button

showCloseFullScreenButton() - Show Close Full Screen Button

hideCloseFullScreenButton() - Hide Close Full Screen Button

hideChromeCastButton() - Hide Chromecast Button

showSlidingPanel() - Show Sliding Panel

hideSlidingPanel() - Hide Sliding Panel

showLogoView() - Show Logo View

hideLogoView() - Hide Logo View

showLiveIcon() - Show Live Icon

hideLiveIcon() - Hide Live Icon

hideSeekSlider() - Hide Seek Slider

showSeekSlider() - Show Seek Slider

Fullscreen Functions

isFullScreen() - Check if player is full screen (Returns Boolean)

setAllowFullScreen() - Function to Allow full screen(True by default)

openFullScreen() - Open Full Screen

closeFullScreen() - Close Full Screen

Overlay functions

addOverlay(view: View, identifier: String = "") - view - Overlay to add, identifier - Overlay Identifier

removeOverlay(identifier: String) - identifier - Identifier of overlay you want to remove

getOverlay(identifier: String) - Returns view of overlay with given identifier

hasOverlay(identifier: String) - Returns Boolean if a player has overlay with given identifier

Helper Button

showHelperButton() - Show Helper Button

hideHelperButton() - Hide Helper Button

setHelperImage() - Set the image of the helper button

On Helper Button Tapped HELPER_BUTTON_CLICKED PlayerEvent is called