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

[Feature Request] Change the sound.wav that plays when enabling the setting Beep Quoting You and allow to adjust the volume of the Sound Played #103

Open
Adulau2003 opened this issue Sep 12, 2024 · 3 comments
Labels
feature request New feature or request polish Not necessary broken, but could be better

Comments

@Adulau2003
Copy link

Adulau2003 commented Sep 12, 2024

I was reminded of this old thread: ccd0#950
It's really loud and very typical, I'd like to change it to something else, but at the very least lower its volume to make watching videos in the same browser more feasible. Since this is the actively developed fork. I'd figured I open a ticket. Feel free to ignore it. After all I'm asking for a favor.

@TuxedoTako TuxedoTako added the feature request New feature or request label Sep 25, 2024
TuxedoTako added a commit that referenced this issue Sep 28, 2024
- Allow setting a custom thread update sound and volume in the advanced settings. #103
@TuxedoTako
Copy link
Owner

Released in 2.14.0.

@saxamaphone69
Copy link

saxamaphone69 commented Sep 28, 2024

Doesn't actually work in 2.14.0 (Default or custom, I just rolled back to 2.13.3 and the beep is there)
Must've accidently set it to 0, works fine!

  • Perhaps the option to change both/either sounds (one for new post and one for quoting you)
  • Perhaps the option to preview the sound, at the volume set
  • On initial load the volume reads "100"
  • When using the spin buttons, the lowest you can go is 0.1 rather than 0 (which can be typed in)
  • What file types are accepted? Are these sanitised or checked in any way? In theory I could put a URL, correct?
  • Within the Updater menu, under beep, perhaps a link that takes you to the relevant section in the settings?
  • Is it possible to just allow a user to upload a file (wav or mp3) and convert it to data URI using FileReader? ChatGPT code:
<input type="file" id="audioFileInput" accept=".wav, .mp3" />
<p id="base64Output"></p>

  <script>
    document.getElementById('audioFileInput').addEventListener('change', function(event) {
      const file = event.target.files[0];

      if (file) {
        const reader = new FileReader();

        // This will be called when the file is read as a data URL (base64)
        reader.onload = function(e) {
          const base64String = e.target.result;
          document.getElementById('base64Output').textContent = base64String;
        };

        // Read the file as a Data URL
        reader.readAsDataURL(file);
      } else {
        alert('Please upload a valid WAV or MP3 file.');
      }
    });
  </script>

@TuxedoTako
Copy link
Owner

Doesn't actually work in 2.14.0 (Default or custom, I just rolled back to 2.13.3 and the beep is there) Must've accidently set it to 0, works fine!

No, the audio gives an error on an invalid volume, and the initial 100 is invalid. I fixed that in 2.14.1.

  • Perhaps the option to preview the sound, at the volume set

It is ment to do that, but the audio wasn't initialised in the index or catalog.

  • When using the spin buttons, the lowest you can go is 0.1 rather than 0 (which can be typed in)

I set the minimum to .01 because the volume input is not ment to turn the sound off completely. The reason other values can be typed in is because invalid values aren't validated until a submit event or until it's done manually, which doesn't happen in the settings modal.

  • What file types are accepted? Are these sanitised or checked in any way? In theory I could put a URL, correct?

Any URL the browser supports as audio.

  • Within the Updater menu, under beep, perhaps a link that takes you to the relevant section in the settings?
  • Is it possible to just allow a user to upload a file (wav or mp3) and convert it to data URI using FileReader?

Not a bad Idea.

@TuxedoTako TuxedoTako added the polish Not necessary broken, but could be better label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request polish Not necessary broken, but could be better
Projects
None yet
Development

No branches or pull requests

3 participants