UI customization
The BridPlayer SDK offers its users a high level of customization options for the player's appearance. You can easily pass your own drawable elements or colors to the BridPlayer via its builder.
Note: the recommended size for drawable elements is 24dp.
Once all desired methods have been called, create a BridPlayer instance by calling build() on the BridPlayerBuilder object:
BridPlayer bridPlayer = bridPlayerBuilder.build();
The following methods are available:
Mobile UI customization:
The parameters of the method are the IDs of resource files, and if you don't want to modify certain UI elements, it is sufficient to pass null.
// Set the player's skin for various UI elements
public BridPlayerBuilder setPlayerSkin(@Nullable @ColorRes Integer playPauseButtonColor, @Nullable @DrawableRes Integer fullscreenIcon, @Nullable @DrawableRes Integer fullscreenCloseIcon,
@Nullable @DrawableRes Integer unmuteIcon, @Nullable @DrawableRes Integer muteIcon, @Nullable @DrawableRes Integer playlistIcon, @Nullable @DrawableRes Integer exitIcon,
@Nullable @DrawableRes Integer shareIcon, @Nullable @DrawableRes Integer settingsIcon)
// Set the color of the play/pause button
public BridPlayerBuilder setPlayPauseButtonColor(@ColorRes int playPauseButtonCustom)
// Set the icon for entering fullscreen mode
public BridPlayerBuilder setFullscreenIcon(@DrawableRes int fullscreenIcon)
// Set the icon for exiting fullscreen mode
public BridPlayerBuilder setCloseFullscreenIcon(@DrawableRes int fullscreenCloseIcon)
// Set the icon for unmuting the player
public BridPlayerBuilder setUnmuteIcon(@DrawableRes int unmuteIcon)
// Set the icon for muting the player
public BridPlayerBuilder setMuteIcon(@DrawableRes int muteIcon)
// Set the icon for the playlist button
public BridPlayerBuilder setPlaylistIcon(@DrawableRes int playlistIcon)
// Set the icon for the playlist exit button
public BridPlayerBuilder setPlaylistExitIcon(@DrawableRes int exitIcon)
// Set the icon for the share button
public BridPlayerBuilder setShareIcon(@DrawableRes int shareIcon)
// Set the icon for the settings button
public BridPlayerBuilder setSettingsIcon(@DrawableRes int settingsIcon)
// Set the colors of various timeline elements
public BridPlayerBuilder setTimelineColors(@ColorRes int playedColor, @ColorRes int unplayedColor, @ColorRes int bufferedColor, @ColorRes int scrubberColor)
TV UI customization
// Set the player's skin for TV mode UI elements
public BridPlayerBuilder setTvPlayerSkin(@Nullable @DrawableRes Integer circle_button,@Nullable @DrawableRes Integer forward)
// Set the icon for the fast-forward button in TV mode
public BridPlayerBuilder setTVControls(int forwardIcon)
// Set the color of the focus outline in TV mode
public BridPlayerBuilder setTVFocusColor(int focusDrawable)
Updated 9 months ago
What’s Next