Skip to main content

Extending the UI

Runtime: player · Use it for: a custom catalog action and restart control Follow the UI extension guide for registration, slot validation, and cleanup rules. Declare depend: [reverse-player]. This example adds a menu action that shows the replay ID and a hotbar button that restarts playback. Reserve a free hotbar slot before registering: slot 8 is free in the defaults, but may be used by customized layouts. The player menu registry is nullable in network-worker mode. The hotbar remains a separate service. Add action: example:show_id to an appropriate replay-bearing menu item if you want to expose the menu action. The restart action passes context.session().getSessionId() to both timeline controls. If you add viewer defaults, use layout.addDefaultState(viewer.getUniqueId(), key, value) and clearViewerState(viewer.getUniqueId()); rendering still uses layout.refresh(viewer) or layout.refresh(session) with actual objects. Leave/stop through the playback service so its HUD and session-keyed sidebar cleanup run too.
Copy this class into your integration. Programmatic registrations require explicit cleanup; they are not automatically owned by the registering plugin.