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

Support recording audio in web #273

Open
lukexor opened this issue May 31, 2024 · 0 comments
Open

Support recording audio in web #273

lukexor opened this issue May 31, 2024 · 0 comments
Labels
enhancement New feature or request tetanes web Web platform related

Comments

@lukexor
Copy link
Owner

lukexor commented May 31, 2024

Desktop supports recording audio .wav files to the users music directory based on OS without user interaction. In web, downloading files requires the user to interact with the page.

This could be done by showing a message with a 'Download' button when the recording is stopped, allowing the user to download it or discard it.

Some reference JS code for how this might work (will need to be converted to Rust):

const blob = new Blob([binEncodedData], {
  type: "application/octet-stream",
});

const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;

a.download = "demo.replay";
document.body.appendChild(a);
a.click();

document.body.removeChild(a);
URL.revokeObjectURL(url);
@lukexor lukexor added enhancement New feature or request web Web platform related labels May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tetanes web Web platform related
Projects
None yet
Development

No branches or pull requests

1 participant