Skip to content

Theming

The control chrome is fully themeable through the UI config: a color token set (accent, track colors, surfaces, text tiers…), a dimension set (button sizes, track heights, insets — with automatic fullscreen step-up), replaceable icons for every glyph, and title text styling.

OGUiConfig.Builder()
.setControlColors(OGControlColors(adAccent = Color(0xFF7BD88F)))
.setProgressColors(played = Color.White, track = Color.DarkGray, scrubber = Color.White)
.setPlayIcon(R.drawable.my_play)
.setSeekForwardIcon(R.drawable.my_ff)
.setTitleTextStyle(TextStyle(fontSize = 20.sp, fontWeight = FontWeight.Bold))
.build()

The token sets carry the same names on Android, iOS, React Native and Flutter, and on the web with the differences noted below:

SetTokens
Colors (16)foreground, foregroundMuted, foregroundFaint, trackPlayed, trackBuffered, trackRemaining, thumb, thumbHalo, pressed, liveEdge, liveBehind, adAccent, menuSurface, menuSelected, menuBorder, chipSurface
Dimensions (23)trackHeight, trackHeightActive, thumbSize, thumbSizeActive, thumbHaloSize, scrubTouchHeight, touchTargetMin, iconSize, playButtonSize, playGlyphSize, seekButtonSize, seekGlyphSize, clusterGap, bottomBarHeight, edgeInset, bottomScrimHeight, topScrimHeight, menuMinWidth, menuMaxWidth, menuItemHeight, menuCorner, chipHeight, adCueMarkerSize

adAccent colours the ad progress bar and the ad-cue markers (on iOS, accent remains as another name for the same token). The dimensions are the embedded sizes: in fullscreen the player steps the transport, bottom bar, insets, scrims and chips up to its own fullscreen sizes. The web’s dimens has no touchTargetMin and adds cueMinSize / cueMaxSize, the bounds of the subtitle font size.

What’s replaceable: play/pause/replay, seek forward/back, fullscreen enter/exit, subtitles, audio, speed, quality, volume states, the ad transport glyphs and, on Android TV and Apple TV, the playlist previous/next glyphs (setSkipPreviousIcon / setSkipNextIcon in Kotlin, skipPreviousIcon / skipNextIcon in Swift). What’s deliberately not configurable: content-rating position (fixed top-right by Kijkwijzer convention), the LIVE chip’s presence on live streams, and the trial watermark (a license removes it).

Your own error copy belongs to theming too — see error handling.