-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JS timeline control and callback APIs #8673
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
jprochazk
added
enhancement
New feature or request
🕸️ web
regarding running the viewer in a browser
include in changelog
labels
Jan 13, 2025
|
emilk
approved these changes
Jan 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
include in changelog
🕸️ web
regarding running the viewer in a browser
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related
What
Adds the following methods to
WebViewer
:As well as the following events:
The event names are somewhat inspired by
HTMLMediaElement
, e.g.timeupdate
.See https://github.com/rerun-io/web-viewer-example/blob/jan/temp-timeline-controls-example/src/main.ts#L15 for an example usage of these new APIs.
For the time being, I only added what I thought was necessary to implement an "external timeline". I ended up making all the new methods very explicit in which recording and timeline they deal with, but it's not too verbose to work with. I don't feel strongly about any of the names, they are fully open to bikeshedding 🙂.
All event callbacks are called from
TimeControl::update
. Time updates are not throttled in any way, but they don't seem to be frequent enough to show up in any profiles or noticeably slow down the viewer. That is, unless you put a lot of JS code in them.