Type Alias: RnMediaCastButton
type RnMediaCastButton = HybridView<RnMediaCastButtonProps>;
Defined in: packages/cast/src/specs/cast-button.nitro.ts:42
The native Google Cast button, as a React Native view.
- iOS — a
GCKUICastButton(GoogleCast/GCKUICastButton.h:22, aUIButtonsubclass). Left with its defaulttriggersDefaultCastDialog = YES, so a tap presents the framework's own device dialog. That is also what drives the iOS local-network permission choreography: by SDK design discovery starts on the first tap, never before, so the OS prompt appears exactly when the user asked for devices. - Android — an
androidx.mediarouter.app.MediaRouteButtonhanded toCastButtonFactory.setUpMediaRouteButton(Context, MediaRouteButton). That is the only wiring that honoursCastOptions.setShowSystemOutputSwitcherOnCastIconClick(true)(which ourOptionsProvidersets): on Android 13+ a tap opens the SYSTEM output switcher; below that, the in-appMediaRouteChooserDialog.
See
packages/cast/src/cast-button.tsx for the JS-facing component.