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

fix: handling existing file when starting recording #1611

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vkornel97
Copy link

@vkornel97 vkornel97 commented Oct 29, 2024

Description & motivation

This PR introduces a fix to prevent potential errors when starting a new recording with HKStreamRecorder. Previously, attempting to record with a file name that already existed in the destination directory would cause an error, as AVAssetWriter fails if a file already exists at the specified path. This fix ensures that any existing file with the specified name is removed before the recording process begins.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots:

Copy link
Owner

@shogo4405 shogo4405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recording of live streams is valuable. It’s not desirable to delete it automatically.
In this case, an exception should be raised, allowing library users to handle it themselves.

There are a few parts I’d like to revise, so I’ll take care of it on my end.

@shogo4405
Copy link
Owner

seealso

@vkornel97
Copy link
Author

seealso

@shogo4405 Thank you for the quick reply and action!

@shogo4405
Copy link
Owner

@vkornel97 Can i close this PR?

@vkornel97
Copy link
Author

Yes, of course!

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.

2 participants