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

Possible to enable or disable call recording in the middle of a call? #198

Closed
bagarwa opened this issue Dec 15, 2022 · 7 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@bagarwa
Copy link

bagarwa commented Dec 15, 2022

I see that currently I'm not able to change the state of call recording after answering a phone call. If the call recording was enabled before I got the call, the call will be recorded and I can't stop it during the call. And if the call recording was not enabled before I got the call, I can't enable it during the call.

This leads to situations where I either keep it enabled all the time, and record unnecessary calls too and then delete the recording afterwards. OR not keep it enabled all the time, and risk missing to record a call that I should've, as I can't always make an excuse to the caller to call me again in a minute (giving me a chance to enable recording.)

It would be really really helpful if we can select whether to record a call or not, during the call itself.

(Pixel 7 Pro, Android 13, Magisk Canary.)

@chenxiaolong chenxiaolong self-assigned this Dec 26, 2022
@chenxiaolong chenxiaolong added the enhancement New feature or request label Dec 26, 2022
@chenxiaolong
Copy link
Owner

chenxiaolong commented Dec 26, 2022

Would adding a delete option to the Call recording in progress notification be good enough for your use case? It would cancel the current recording and delete what has been recorded during the call so far.

That is the simplest thing for me to implement and I'd be willing to add that.

EDIT: Regarding the opposite solution of starting recording during the middle of a call, I probably won't add that. It'd require too many changes to how BCR works and I'd prefer not to complicate the code more.

@bagarwa
Copy link
Author

bagarwa commented Dec 26, 2022

Would adding a delete option to the Call recording in progress notification be good enough for your use case? It would cancel the current recording and delete what has been recorded during the call so far.

That would help in some scenarios where I know I would absolutely not need to record this call. Spam calls for example.

But if in other calls which are not worth "I should record this" right now, and I press that delete button, but afterwards it turns important and I need to record that call, I no longer can.

I was originally thinking that enabling BCR will only enable BCR's Call in progress notification at the start of every call. That notification can have a "start recording" button. Tapping that button will actually start recording the call.

But if it is too complicated to implement, would it be possible to add a "pause" option instead? For example, consider this scenario -

  • Call Recording is enabled.
  • User picks up an incoming call. BCR starts recording the call.
  • Conversation is not important, so user presses the "pause" button on the Call recording in progress notification.
  • Notification text changes to Call recording is paused, and the pause button text changes to "Resume".
  • After few minutes, the user thinks the conversation is becoming worth recording. So they tap the resume button on the notification. Call recording resumes.
  • When the call ends, the record contains only the parts of the call when recording was not paused.

Is that possible to do? If not, I'd rather have the option you suggested, than not have it. I appreciate you reading my request and your time spent on it.

@chenxiaolong
Copy link
Owner

Hmm, I like what you described for the pause option. That should be fairly simple to implement: BCR would grab the call audio for the entire duration of the call, but while "paused", it will throw away the data instead of writing to the output file.

Assuming that implementing ^^ doesn't complicate the code too much, I'll consider adding something similar to your original request (a "start recording"-type option), but it'll be based on the pause feature.

  • New configuration option for the initial recording state: either Recording or Paused
  • If the initial recording state is Recording, then BCR works as it does now. The user can pause and resume if needed.
  • If the initial recording state is Paused, then BCR still reads the call audio, but throws it away until the user hits Resume. If the user never presses Resume in the notification, then BCR deletes the (empty) output file when the call ends.

In BCR, the lifetime of the recording is tied to the lifetime of a call. Changing this would introduce a lot of complexity. But I think this "always record, but discard data when paused" approach should hopefully keep things simple and reliable.

@bagarwa
Copy link
Author

bagarwa commented Dec 27, 2022

That would be a nice implementation. Looking forward to it.

chenxiaolong added a commit that referenced this issue Dec 27, 2022
This commit implements basic pause/resume functionality via a
notification action in BCR's persistent notification. Pausing is
implemented by keeping the AudioRecord active, but discarding the data
instead of passing it to the encoder. Pausing/resuming does not happen
immediately, but after the processing of one buffer (which should be
under 50ms on most devices). It's fast enough to be imperceptible.

Issue: #198

Signed-off-by: Andrew Gunnerson <[email protected]>
chenxiaolong added a commit that referenced this issue Dec 27, 2022
This commit implements basic pause/resume functionality via a
notification action in BCR's persistent notification. Pausing is
implemented by keeping the AudioRecord active, but discarding the data
instead of passing it to the encoder. Pausing/resuming does not happen
immediately, but after the processing of one buffer (which should be
under 50ms on most devices). It's fast enough to be imperceptible.

Issue: #198

Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong
Copy link
Owner

The initial pause/resume implementation (button in the notification) has been implemented in #210 and will be included in version 1.28.

chenxiaolong added a commit that referenced this issue Dec 28, 2022
This commit adds a new "initially paused" option to BCR's UI. If it's
disabled, then BCR works as it always has: calls are recorded as soon as
they enter the connected state. If the option is enabled, then the
recording starts in the paused state. The user can choose to resume via
BCR's persistent notification. If the recording is never resumed, then
the empty output file is deleted and no success notification will be
shown.

This new option is disabled by default.

Issue: #198

Signed-off-by: Andrew Gunnerson <[email protected]>
chenxiaolong added a commit that referenced this issue Dec 28, 2022
This commit adds a new "initially paused" option to BCR's UI. If it's
disabled, then BCR works as it always has: calls are recorded as soon as
they enter the connected state. If the option is enabled, then the
recording starts in the paused state. The user can choose to resume via
BCR's persistent notification. If the recording is never resumed, then
the empty output file is deleted and no success notification will be
shown.

This new option is disabled by default.

Issue: #198

Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong
Copy link
Owner

The new UI option for the initial recording state has been implemented in #211 and will be included in version 1.29.

@bagarwa
Copy link
Author

bagarwa commented Dec 28, 2022

Thank you.

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

No branches or pull requests

2 participants