-
Notifications
You must be signed in to change notification settings - Fork 177
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
Editor: Changed video recording trim to happen before insertion #12022
Conversation
Thanks for working on this 👍 I originally had something simpler in mind without a dialog, but of course I didn't now the technical constraints around this. Would be good to discuss this with @aaskedall to get his thoughts on this. |
The dialog is of course only temporary to make it obvious that something is happening in the WIP PR. We should definitely find a better solution.
I plan to once he's back from OOO later today(?). |
There is still an annoying bug with re-trimming an already trimmed video (while still in the recording mode). Sometimes the original blob URL doesn't work anymore, like it has been garbage collected (or We need to fix this bug, but it's very inconsistent, so it's pretty hard to track down. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the known re-trimming bug and some edge cases to handle - otherwise looks good 👍🏻
Plugin builds for a09ede4 are ready 🛎️!
|
if ( | ||
previousBlobUrl && | ||
previousBlobUrl !== mediaBlobUrl && | ||
previousBlobUrl !== originalMediaBlobUrl | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like it has been garbage collected (or window.URL.revokeObjectURL has been called), but I don't see why that should happen
Maybe because it has been revoked right here? 🤦 Well, I guess this fixes it though
const resetTrim = useCallback(() => { | ||
setIsTrimming(false); | ||
setIsAdjustingTrim(false); | ||
setTrimData({ start: 0, end: null }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't actually reset the trim info in the reset function, so that's why it didn't work correctly.
Context
This moves the actual trimming of the video recording up so it happens as soon as the user presses "trim", and not only when they press "insert".
Todo
(partially fixed, see comment below)User-facing changes
This flow now happens when trimming a new recording - the "cancel trim" button in the footer of course also works.
Testing Instructions
Steps to validate:
Checklist
Type: XYZ
label to the PRFixes #11988