# useScheduledBroadcast Show an event countdown, waiting state and authorized playback through your application. The hook works without joining an RTC room. All callbacks call your application's authenticated backend; never place management credentials in React. ```tsx import { useScheduledBroadcast } from '@relayrtc/react' export function ScheduledEventStatus({ options }: { options: Parameters[0] }) { const event = useScheduledBroadcast(options) return

{event.isWaiting ? 'Waiting for publisher' : event.schedule?.state ?? 'Loading'}

{event.countdownSeconds ?? 'Loading'} seconds until start

{event.error &&

{event.error.message}

}
} ``` getSchedule/getPlayback receive AbortSignal. The optional update callback receives `{version, timing, idempotencyKey}` and AbortSignal; cancel/startNow receive `{version, idempotencyKey}` and AbortSignal. They return the observed ScheduledBroadcast. Forward the key and expected version through your backend. Command identities persist after uncertain responses and stale poll results cannot overwrite a newer command result. Recreate callbacks when changing the selected event. Browser consumers may use ScheduledBroadcastClient directly with the same options. The hook returns schedule, playback, pending, error, serverOffsetMs, countdownSeconds, isWaiting, isLive, update, cancel, startNow and refresh. Countdown is null before the first clock tick or without a schedule. It uses serverTime when authorized playback metadata is available and does not control execution. isWaiting means schedule state starting; isLive means playback state live. Polling defaults to 2500 ms and accepts 1000–60000 ms; polling and the one-second countdown timer stop on unmount. Missing playback metadata, including a closed access window, does not enable the player. For playback, pass a normal StreamPlaybackOptions object to BroadcastPlayer whose callbacks call your backend's schedules.getPlayback and schedules.createPlaybackGrant. The player is mounted when the event becomes live and uses only event-scoped grants. Reschedule/cancellation clears playback and revokes media access. Use explicit device controls in a separate host stage; this hook never starts a camera or OBS. See the [scheduling guide](/guides/scheduled-broadcasts) for local-time conversion, source deadlines, reminders, window policies and cancellation handling.