SignificantTrades
SignificantTrades copied to clipboard
Different sounds for certain events
I'd like to request a feature. It would be great if users could change the notifications for events like liquidations, and/or set different sounds for the threshold trade volumes.
I think adding this to the threshold menu would make most sense from a UI perspective, but it's getting a little crowded there. So maybe expand the audio options in the menu?
How do you want to set the alternative song, says you want to change it for trades above a specific threshold, play a song. How you do see that? Upload a wav to the app ? Or edit a js like code which define what beep to play in what order/intensity etc
< 100k
this.play(659.26, Math.sqrt(factor) / 10, 0.1 + Math.sqrt(factor) / 10)
> 100k
[659.26, 830.6].forEach((f, i) => setTimeout(() => this.play(f, 0.05 + Math.sqrt(factor) / 10, 0.1 + factor * 0.1), i * 80))
> 1M
[659.26, 830.6, 987.76, 1318.52].forEach((f, i) => setTimeout(() => this.play(f, 0.05 + Math.sqrt(factor) / 25, 0.1 + factor * 0.1), i * 80)
Interesting question. Never thought about it. The obvious problem is that sounds can't be as easily inserted as GIF's. There's no Giphy-like API for sounds, which makes it very hard to automate.
I see a couple of options:
- Users specify a direct URL from where to play the file. As far as I remember the HTML5 audio tag plays most sound files in almost any browser. MP3 is probably best supported.
- Users drag'n'drop their audio files onto the browser window.
In either case, the question is whether this causes a lot of issues for the app? It is probably best to use HTML5 local storage to store the files, then they are easier to play. The app would only have to iterate an array of locally stored sounds, and display a menu. Does that make sense?
Here's a (horrific) mockup. I hope it gets a rough idea across. Not a huge fan of "when in doubt, just make it a submenu" solutions though.