Builder

class Builder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard

Hides every hideable control: scrub bar, time labels, buttons and ad markers. Play/pause and the LIVE chip are never hidden — a viewer can always stop playback and always sees live status. Call setShow* setters after this to selectively re-enable pieces.

Link copied to clipboard

Icon for the ad chrome's pause button.

Link copied to clipboard

Icon for the ad chrome's play (resume-ad) button.

Link copied to clipboard

Replaces the built-in audio-track icon with a drawable resource.

Link copied to clipboard

Moves the cast button to a different corner/edge of the player.

Link copied to clipboard

Replaces the cast icon shown while connected to a receiver.

Link copied to clipboard

Replaces the built-in cast icon with a drawable resource.

Link copied to clipboard

How long the rating icons stay before fading out.

Link copied to clipboard
Link copied to clipboard

Overrides dimension tokens of the built-in controls.

Link copied to clipboard

How long the controls stay visible without interaction while playing.

Link copied to clipboard

Up to 8 host icon buttons rendered inline in the top-end control row, left of the Cast button. They follow the controls' show/hide logic; use OGPlayerView's overlay slots for persistent elements (watermarks) instead.

Link copied to clipboard

Overrides colour tokens of the built-in controls.

Link copied to clipboard

Text style (font, size, weight, color) for the error-overlay message. Null keeps the SDK default.

Link copied to clipboard

Replaces the built-in fullscreen enter/exit icons with drawable resources.

Link copied to clipboard

Drives the chrome with a TV remote instead of touch — see OGInputMode.REMOTE. Explicit by design: the SDK never infers a television; isTelevision is the one-line check for hosts that ship a single APK to phones and TVs.

Link copied to clipboard

Remote mode only (ignored otherwise): publish a system MediaSession that mirrors the player, so voice assistants, the now-playing row and media buttons pressed while another surface is up reach it. Default false.

Link copied to clipboard

Replaces the built-in pause icon with a drawable resource.

Link copied to clipboard

Replaces the built-in play icon with a drawable resource.

Link copied to clipboard
fun setProgressColors(played: Color, track: Color, scrubber: Color): OGUiConfig.Builder

Colors for the progress bar: played portion, remaining track, and scrubber thumb.

Link copied to clipboard

Custom Retry label, any language; wins over OGStrings.retry (default "Retry").

Link copied to clipboard
fun setRetryButtonStyle(containerColor: Color? = null, contentColor: Color? = null, textStyle: TextStyle? = null): OGUiConfig.Builder

Styles the error overlay's Retry button. Any argument left null keeps that aspect's SDK default (brand-yellow container, near-black content, 14sp label).

Link copied to clipboard

Replaces the built-in seek-backward icon with a drawable resource.

Link copied to clipboard

Replaces the built-in seek-forward icon with a drawable resource.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Hides the content-rating icons entirely.

Link copied to clipboard

Shows or hides the scrub bar (including its thumbnail preview).

Link copied to clipboard

Hides the error overlay's Retry button (shown by default).

Link copied to clipboard

Shows or hides the seek forward/backward buttons (VOD and LIVE_DVR only).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Hides the title overlay entirely.

Link copied to clipboard

Shows/hides the playlist "Up next" countdown card; hidden means silent auto-advance.

Link copied to clipboard
Link copied to clipboard

Replaces the playlist next glyph of the remote (TV) chrome with a drawable resource. Drawn as-is (not tinted), like the other custom icons.

Link copied to clipboard

Replaces the playlist previous glyph of the remote (TV) chrome with a drawable resource. Drawn as-is (not tinted), like the other custom icons.

Link copied to clipboard

Every text the chrome shows or speaks, in any language — build one from a key → text map with OGStrings.fromMap. English by default; nothing is picked from the device locale. The explicit options keep precedence: setErrorMessageProvider over errorGeneric, setRetryButtonLabel over retry, setUpNextText over upNext.

Link copied to clipboard

Custom text style (font, size, weight, color) for the title overlay.

Link copied to clipboard

How long the title stays on screen before fading out.

Link copied to clipboard

Seconds before an item's end at which the card appears.

Link copied to clipboard
fun setUpNextStyle(backgroundColor: Color? = null, textStyle: TextStyle? = null): OGUiConfig.Builder

Styles the card: background color and/or text style. Null keeps that aspect's SDK default.

Link copied to clipboard

Card text template; {seconds} and {title} are substituted. Wins over OGStrings.upNext.