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.
This PR features working interactive reactions with view, delete and rate limit
The reactions are simply links Lottie files that can be swapped out to any animations of your liking.
The code implementation here is meant to be simple and does not account for adding the reactions to your DB and currently ties the reaction the users IP. I figured I would let you decide how to handle user differentiation and database structure. It should not be too much work altering this code to account for a predefined array of reactions that come from the DB.
The reaction displays on the timeline for 5 seconds after being added. All reactions can be shown by hovering the marker that sits just above the timeline. Clicking a marker of ones own reaction will delete it. More logic will need to be added to add and remove reactions to the DB in sync. No more than one reaction per user can be made within a 10 second span on the timeline to prevent reaction spamming. All of these values can be adjusted to fit preferences.
Reactions also show when the player progress approaches their marker.
Screen.Recording.2024-11-21.at.8.25.11.AM.mov