-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Deeplinks: pause/resume/restart recording + switch mic/camera #1621
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
Changes from 2 commits
38b9afb
e02ac71
7bd37b3
cf8787f
b6264a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,6 +26,16 @@ pub enum DeepLinkAction { | |||||||||||||
| mode: RecordingMode, | ||||||||||||||
| }, | ||||||||||||||
| StopRecording, | ||||||||||||||
| PauseRecording, | ||||||||||||||
| ResumeRecording, | ||||||||||||||
| TogglePauseRecording, | ||||||||||||||
| RestartRecording, | ||||||||||||||
| SwitchMicrophone { | ||||||||||||||
| mic_label: Option<String>, | ||||||||||||||
| }, | ||||||||||||||
| SwitchCamera { | ||||||||||||||
| camera: Option<DeviceOrModelID>, | ||||||||||||||
| }, | ||||||||||||||
| OpenEditor { | ||||||||||||||
| project_path: PathBuf, | ||||||||||||||
| }, | ||||||||||||||
|
|
@@ -146,6 +156,26 @@ impl DeepLinkAction { | |||||||||||||
| DeepLinkAction::StopRecording => { | ||||||||||||||
| crate::recording::stop_recording(app.clone(), app.state()).await | ||||||||||||||
| } | ||||||||||||||
| DeepLinkAction::PauseRecording => { | ||||||||||||||
| crate::recording::pause_recording(app.clone(), app.state()).await | ||||||||||||||
| } | ||||||||||||||
| DeepLinkAction::ResumeRecording => { | ||||||||||||||
| crate::recording::resume_recording(app.clone(), app.state()).await | ||||||||||||||
| } | ||||||||||||||
| DeepLinkAction::TogglePauseRecording => { | ||||||||||||||
| crate::recording::toggle_pause_recording(app.clone(), app.state()).await | ||||||||||||||
| } | ||||||||||||||
| DeepLinkAction::RestartRecording => { | ||||||||||||||
| crate::recording::restart_recording(app.clone(), app.state()) | ||||||||||||||
| .await | ||||||||||||||
| .map(|_| ()) | ||||||||||||||
| } | ||||||||||||||
| DeepLinkAction::SwitchMicrophone { mic_label } => { | ||||||||||||||
| crate::set_mic_input(app.state(), mic_label).await | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: it’s a bit easier to follow (and a little less inference-dependent) if this matches the
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small robustness thing: treat empty mic labels as
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in |
||||||||||||||
| } | ||||||||||||||
| DeepLinkAction::SwitchCamera { camera } => { | ||||||||||||||
| crate::set_camera_input(app.clone(), app.state(), camera, None).await | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor robustness: mirror the mic label handling and treat an empty
Suggested change
|
||||||||||||||
| } | ||||||||||||||
| DeepLinkAction::OpenEditor { project_path } => { | ||||||||||||||
| crate::open_project_from_path(Path::new(&project_path), app.clone()) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
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.
For deeplinks, do you want pause/resume/toggle to behave like
StopRecordingand error when there’s no active recording? Right now these will succeed silently when nothing is recording.