Package-level declarations

Types

Link copied to clipboard
class ActivityFullscreenHandler @JvmOverloads constructor(activity: Activity, lockLandscape: Boolean = true, onFullscreenChanged: (isFullscreen: Boolean) -> Unit? = null) : FullscreenHandler

Ready-made FullscreenHandler for the common case: hides/shows the system bars edge-to-edge and, with lockLandscape, drives screen orientation.

Link copied to clipboard
class CustomAction(@DrawableRes val iconRes: Int, val contentDescription: String? = null, val onClick: () -> Unit)

A host-supplied icon button rendered inline in the player's top-end control row, to the LEFT of the Cast button — icon-only by design (no labels). Custom actions are part of the control chrome: they appear and hide with the controls and are suppressed during ad breaks. Up to 8 per player via OGUiConfig.Builder.setCustomActions.

Link copied to clipboard

Implemented by the host app to enter/exit fullscreen presentation (orientation, system bars, layout). The player view only toggles state and renders the fullscreen button when a handler is provided.

Link copied to clipboard
data class OGControlColors(val foreground: Color = Color.White, val foregroundMuted: Color = Color.White.copy(alpha = 0.70f), val foregroundFaint: Color = Color.White.copy(alpha = 0.38f), val trackPlayed: Color = Color.White, val trackBuffered: Color = Color.White.copy(alpha = 0.38f), val trackRemaining: Color = Color.White.copy(alpha = 0.22f), val thumb: Color = Color.White, val thumbHalo: Color = Color.White.copy(alpha = 0.20f), val pressed: Color = Color.White.copy(alpha = 0.12f), val liveEdge: Color = Color(0xFFF2453E), val liveBehind: Color = Color.White.copy(alpha = 0.60f), val adAccent: Color = Color(0xFFF6C445), val menuSurface: Color = Color(0xF017181A), val menuSelected: Color = Color.White.copy(alpha = 0.10f), val menuBorder: Color = Color.White.copy(alpha = 0.10f), val chipSurface: Color = Color.Black.copy(alpha = 0.55f))

Colour tokens for the built-in player controls. All defaults derive from pure white or pure black so the system survives any host theme; override individual tokens via OGUiConfig.Builder.setControlColors.

Link copied to clipboard
data class OGControlDimens(val trackHeight: Dp = 3.dp, val trackHeightActive: Dp = 5.dp, val thumbSize: Dp = 12.dp, val thumbSizeActive: Dp = 18.dp, val thumbHaloSize: Dp = 34.dp, val scrubTouchHeight: Dp = 48.dp, val touchTargetMin: Dp = 48.dp, val iconSize: Dp = 24.dp, val playButtonSize: Dp = 56.dp, val playGlyphSize: Dp = 28.dp, val seekButtonSize: Dp = 48.dp, val seekGlyphSize: Dp = 24.dp, val clusterGap: Dp = 20.dp, val bottomBarHeight: Dp = 48.dp, val edgeInset: Dp = 12.dp, val bottomScrimHeight: Dp = 140.dp, val topScrimHeight: Dp = 96.dp, val menuMinWidth: Dp = 224.dp, val menuMaxWidth: Dp = 320.dp, val menuItemHeight: Dp = 48.dp, val menuCorner: Dp = 14.dp, val chipHeight: Dp = 24.dp, val adCueMarkerSize: Dp = 4.dp)

Dimension tokens for the built-in player controls (embedded values; fullscreen automatically steps sizes up per the design spec). Override via OGUiConfig.Builder.setControlDimens.

Link copied to clipboard

Visual configuration for OGPlayerView's built-in controls. Every button icon can be replaced with a drawable resource (PNG/vector); when unset, the SDK's built-in vector shapes are drawn. For a completely different control layout, pass customControls to OGPlayerView instead.

Link copied to clipboard

3x3 grid of anchor positions for app-supplied overlays rendered above the video and below the playback controls.

Functions

Link copied to clipboard
fun OGPlayerView(player: OGPlayer, modifier: Modifier = Modifier, uiConfig: OGUiConfig = OGUiConfig.DEFAULT, fullscreenHandler: FullscreenHandler? = null, overlays: Map<OverlaySlot, @Composable () -> Unit> = emptyMap(), overlayOffsets: Map<OverlaySlot, DpOffset> = emptyMap(), startInFullscreen: Boolean = false, autoFullscreenOnRotate: Boolean = false, doubleTapToSeek: Boolean = true, onFullscreenExitRequest: () -> Unit? = null, customControls: @Composable () -> Unit? = null)

Composable video surface with the SDK's playback controls overlaid. Tap toggles controls visibility; controls auto-hide while playing.