Supported Configuration Methods
  • 22 Aug 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Supported Configuration Methods

  • Dark
    Light
  • PDF

Article summary


Configuration MethodParametersNotes
hideAfterTimeOut()
milliseconds : int
Hide the controller after ‘milliseconds'
setPlayerView()
view (xml Layout) - required
activity (Activity) - require
Use this method to set a different player from our default one
setIconColor()
color (String) - required

Sets color to already used icons in Player - eg - Play, Pause, full screen, etc.
In argument, you need to pass hex value

setTextColor()
color (String) - required

Sets color to already Labels in Player -eg - Video Title
In argument, you need to pass hex value

setProgressBarBGColor()color (String) - required

Sets background color to video progress slider. In argument, you need to pass hex value

setProgressBarColor()
color (String) - required

Sets progress color to video progress slider. In argument, you need to pass hex value

shouldAutoPlay()

autoPlay (Bool) - required


shouldPlayMuted()

isMuted (Bool) - required

Method to set if a video has to be played in mute state

setVolumeLevel()
volumeLevel (Int) - required

Method to set volume of video playback. Parameter volumeLevel is Int value which goes from 1~ 100

setLoop()loop(boolean) - required
Method to set if you need to set loop for the video to play it again and again.
setUseController()
useController(boolean) - required
Method to set if you want to show controller for the video or not.
setShowErrorOnPlayer()
showErrorOnPlayer(boolean)
Method to set flag if you want to show error on player in case of playback exception. Default value is true.

Note

If setPlayerView() is used with customized Player View and with customized View IDs, then these params should also be initialized:

optionalPlayerParams.setTitleViewID(R.id.titleName); 

optionalPlayerParams.setDurationViewID(R.id.exoDuration); 

optionalPlayerParams.setPositionViewID(R.id.exoPosition);)


Was this article helpful?