Skip to content
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

feat: Progressive upload during recording (faster Instant Mode) #351

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

richiemcilroy
Copy link
Collaborator

This pull request introduces several enhancements to the instant recording functionality. The key changes include adding support for progressive uploads, modifying the recording flow to accommodate these uploads, and updating the handling of recording completion.

Recording Options and State Management

  • Removed the app parameter from the set_recording_options function in lib.rs.
  • Added logic to take a copy of the pre-created video and other values before dropping the state lock in start_recording.

Progressive Upload Implementation

  • Implemented the progressive upload process for instant recordings in start_recording, including starting the upload in a background task and handling file growth. [1] [2]
  • Added a new function start_progressive_upload in upload.rs to handle the progressive upload process, including chunked uploads and progress tracking.

Notification and Link Sharing

  • Modified handle_recording_finish to return an optional shareable link and adjusted the logic to handle notifications and link copying for instant recordings. [1] [2]
  • Updated handle_recording_end to open the shareable link after the recording has fully stopped and the stop sound has played.

Code Refactoring

  • Added upload_video to the use statement in recording.rs to support the new upload functionality.
  • Changed the start_recording function to use cloned values for id and recording_dir to avoid borrowing issues. [1] [2]

These changes collectively enhance the user experience by improving the reliability and efficiency of recording uploads, particularly for instant recordings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant