Skip to main content

Type Alias: CastSessionEventType

type CastSessionEventType =
| "starting"
| "started"
| "startFailed"
| "ending"
| "ended"
| "resumed"
| "suspended"
| "transferring"
| "transferred"
| "transferFailed";

Defined in: packages/cast/src/specs/cast.nitro.ts:72

Session lifecycle notifications, fanned in from SessionManagerListener<CastSession> (Android) and GCKSessionManagerListener (iOS), plus Android's SessionTransferCallback for the output-switcher stream transfer.

Parity notes — two members are Android-only ceilings:

  • transferring / transferred / transferFailed come from CastContext.addSessionTransferCallback (play-services-cast-framework 22.3.1), the Android 13+ system output-switcher stream transfer. iOS has no system transfer surface and GCKSessionManagerListener (GoogleCast 4.8.6, GCKSessionManager.h) declares no transfer callback, so these never fire there — as does the transferring connection state.
  • startFailed fires on iOS for a failed session start (sessionManager:didFailToStartCastSession:withError:) but not for a failed session resume: 4.8.6 removed the resume-failure callback entirely (there is no didFailToResume… anywhere in the 4.8.6 headers; Google's own CastVideos-swift sample still implements one, which is exactly the silent no-op this note exists to prevent). Android reports it via onSessionResumeFailed.

Everything else fires on both.