Types

Components Types

Props contracts for the components you can replace through VideoProvider's components prop.

These types describe what the toolkit passes to the components you provide through <VideoProvider components>. See Custom Components for a guide and examples.

VideoComponents

The components the toolkit renders internally. VideoProvider accepts a Partial<VideoComponents>: anything you leave out uses the default.

PropertyTypeDefaultDescription
SheetComponentType<SheetProps>DefaultSheet (bottom sheet; side panel on TV)Hosts the settings Menu.
SliderComponentType<SliderProps>DefaultSlider (react-native-awesome-slider)Used by ProgressBar and VolumeControl.
SpinnerComponentType<SpinnerProps>DefaultSpinner (ActivityIndicator)Shown while the video is buffering.
PressFeedbackComponentType<PressFeedbackProps>DefaultPressFeedback (ripple; tint on web)Wraps every control button.

SheetProps

The open state is owned by the toolkit: show the sheet while open is true, and call onOpenChange(false) when the user dismisses it.

PropertyTypeRequiredDescription
openbooleanYesWhether the sheet should be shown.
onOpenChange(open: boolean) => voidYesCall with false when the user dismisses the sheet.
childrenReactNodeYesThe menu content. It already has access to the player state, so it can render in a portal outside VideoProvider.
styleStyleProp<ViewStyle>NoStyle from Menu.Content: the theme's menu background, padding and sheetStyle.
portalHoststringNoThe toolkit's portal host name. The default sheet renders into it; custom sheets can ignore it.

SliderProps

Values are plain numbers. Call onValueChange while the user drags.

PropertyTypeRequiredDescription
variant'progress' | 'volume'YesWhich control is rendering the slider.
valuenumberYesThe current value: seconds for progress, 0–1 for volume.
minimumValuenumberYesThe lowest value.
maximumValuenumberYesThe highest value: the duration for progress (0 until loaded), 1 for volume.
bufferedValuenumberNoHow far the media is buffered, on the same scale as value. progress only.
onValueChange(value: number) => voidYesCall while the user drags.
onSlidingStart() => voidNoCall when the user starts dragging.
onSlidingComplete(value: number) => voidNoCall when the user releases the slider.
heightnumberYesTrack height requested by the control.
thumbWidthnumberYesThumb size requested by the control.
widthnumberNoFixed width requested by the control, if any (VolumeControl sets one).
colors{ active: string; inactive: string; buffered?: string; thumb: string }YesColors from the player theme. buffered is only set for progress.

SpinnerProps

PropertyTypeRequiredDescription
size'small' | 'large'YesRequested size.
colorstringYesColor from the theme, or LoadingSpinner's color prop.
styleStyleProp<ViewStyle>NoPositioning style (centered over the video by default).

PressFeedbackProps

Visual feedback only: the toolkit detects the tap itself, so don't attach a press handler. Extends ViewProps (without children and style); spread the remaining props onto your root view.

PropertyTypeRequiredDescription
childrenReactNodeYesThe button content (usually an icon).
colorstringYesFeedback color from the theme (theme.colors.ripple).
styleStyleProp<ViewStyle>NoStyle for the feedback container.

On this page