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
| Event | Description |
|---|---|
ready | Player is mounted and the first frame is available. |
play | Capture playback started. |
pause | Capture playback paused. |
ended | Capture playback finished (loops restart automatically). |
orientation | Camera lon/lat changed after a drag (debounced). |
error | Video 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.