Looking for the old docs? Go here

Buttons

Google Cast Button

This component is used to request remote playback via Google Cast.

HTMLAttributes<HTMLButtonElement>
Ref<HTMLButtonElement>

A button for requesting Google Cast.

import { GoogleCastButton, type GoogleCastButtonProps } from "@vidstack/react";
import { GoogleCastButton, type GoogleCastButtonProps } from "@vidstack/react";
<GoogleCastButton>
  <ChromecastIcon />
</GoogleCastButton>
<GoogleCastButton>
  <ChromecastIcon />
</GoogleCastButton>
PropTypeDefault
asChild
boolean
false
children
ReactNode
null
disabled
boolean
undefined
CallbackType
onMediaGoogleCastRequest
function
NameDescription
data-active
Whether Google Cast is connected.
data-supported
Whether Google Cast is available.
data-state
Current connection state.