360 SDK — Events

Subscribe to player lifecycle to drive your own UI.

Events

JavaScript
const player = create360Player({ container: "#viewer", videoUrl });

player.on("ready", () => console.log("player ready"));
player.on("orientation", ({ lon, lat }) => {
  // Reflect the user's heading in your UI
});
player.on("error", (error) => console.error(error));

Event reference

EventDescription
readyPlayer is mounted and the first frame is available.
playCapture playback started.
pauseCapture playback paused.
endedCapture playback finished (loops restart automatically).
orientationCamera lon/lat changed after a drag (debounced).
errorVideo failed to load or decode — check the URL and CORS headers.

Pair events with Controls for programmatic playback, and use ended to advance a sequence of results.