PlayerViewEndedPayload
What playerViewEnded gets: the payload a handler receives.
Definition
Section titled “Definition”type PlayerViewEndedPayload = { player: PlayerSnapshot; mode: "camera" | "spectating" | "freecam"; target: CameraTarget | SpectateTarget | null; endReason: PlayerViewEndReason;};Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
player |
PlayerSnapshot |
The player whose view ended. |
mode |
"camera" | "spectating" | "freecam" |
A camera view, spectating, or a freecam. |
target |
CameraTarget | SpectateTarget | null |
What they watched; null for a fixed camera or a freecam. |
endReason |
PlayerViewEndReason |
Why it ended. Renamed in 0.28 from reason. |
Related
Section titled “Related”playerViewEnded: the event