Repository navigation
Player API
idadwind edited this page Sep 21, 2026
·
1 revision
createPlayer(container, { document, autoplay?, onEvent? }) returns Promise<ScenePlayer>.
| Member | Behavior |
|---|---|
play() / pause()
|
Start or pause playback |
seek(time) |
Seek in seconds, clamped to the document timeline |
load(document) |
Validate and asynchronously load a replacement scene |
setParameter(name, value) |
Apply a runtime parameter override |
clearParameterOverrides(name?) |
Clear one override, or all when omitted |
getFrame() |
Return the current document frame |
getCamera(space?) / resetCamera(space?)
|
Inspect/reset a space camera; defaults to the active space |
getPictureInPictureCamera(id) |
Inspect an inset camera |
resetPictureInPictureCamera(id) |
Reset an inset camera |
on(listener) |
Subscribe; returns an unsubscribe function |
playing |
Read-only playback status |
dispose() |
Stop activity and release owned render resources and observers |
Player event types are hover, click, parameter, time and error. Relevant optional fields include object, pictureInPicture, parameter, value, time and error.
A failed load preserves the previous working scene. Concurrent loads favor the latest request. Initial setup and loading can reject; handle their promises as well as runtime error events.
- Installation and development
- Browser quick start
- Scene documents
- Objects and expressions
- Document field reference
- Complete object reference
- Animation
- All animations and events
- Interaction and multiple views
- Browser player API
- Headless evaluation and validation
- Integration and lifecycle
- Features and limitations
- Publishing Webnim
- Troubleshooting
- Reference files