Vencord / Vesktop

Vesktop is a custom Discord App aiming to give you better performance and improve linux support
GNU General Public License v3.0
3.65k stars 172 forks source link

[Feature Request] Restore Discord "Audio Detected" tray icon? #294

Open SpoogLord opened 9 months ago

SpoogLord commented 9 months ago

I like Discords tray icon when you're in a vc, I usually use that to tell if my voice is being picked up so I can have things open over discord, Vesktop seems to disable/replace that, and so far that's the only standard discord feature I miss (if it does exist I just cant find it). There was another issue thread where someone asked for custom tray icons and it was just closed without mention of that feature being added, so if it was added I can't find that either. Would be nice as a settings toggle or a plugin, I would even accept having to upload my own icons for the feature to work.

SpoogLord commented 9 months ago

Ehh, nevermind. My friends cannot understand me when i use Vesktop, switching back to normal discord fixes it, so im just gonna stop using vesktop

PolisanTheEasyNick commented 5 months ago

Sorry for bumping an old issue, but I did some investigation about how we can get this functionality to work. Firstly, we need to get connection object from MediaEngineStore: const conn = [...MediaEngineStore.getMediaEngine().connections][0]; If we can successfully get [0] element from connections array, it means that we are at some VC. Then we can get property whether we are muted using this: const isMuted = conn.input.audio._mute; And we can get whether we are speaking rn like this: const isSpeaking = conn.input.audio.speaking; My first idea about implementing it was to create some plugin, which will take current Tray object and just apply needed icon depending on current status. Second idea was to create some another component of Vesktop and some function like "startUpdatingTray" which will checks for updates in current connection and will change task icon to needed, but I'm not sure how to do it properly it this project structure so maybe anyone, who better knows project structure, can look into this? Any ideas will be greatly appreciated!!

Sqaaakoi commented 5 months ago

Sorry for bumping an old issue, but I did some investigation about how we can get this functionality to work. Firstly, we need to get connection object from MediaEngineStore: const conn = [...MediaEngineStore.getMediaEngine().connections][0]; If we can successfully get [0] element from connections array, it means that we are at some VC. Then we can get property whether we are muted using this: const isMuted = conn.input.audio._mute; And we can get whether we are speaking rn like this: const isSpeaking = conn.input.audio.speaking; My first idea about implementing it was to create some plugin, which will take current Tray object and just apply needed icon depending on current status. Second idea was to create some another component of Vesktop and some function like "startUpdatingTray" which will checks for updates in current connection and will change task icon to needed, but I'm not sure how to do it properly it this project structure so maybe anyone, who better knows project structure, can look into this? Any ideas will be greatly appreciated!!

why are you overcomplicating this, just listen to flux events such as SPEAKING??? take a look at src/webpack/common/types/fluxEvents.d.ts in vencord you can just use findbyprops to get the isSelfMute and toggleSelfMute functions too iirc

PolisanTheEasyNick commented 5 months ago

omg it was so easy T-T yes, we can get this parameters in more easy and stable way. Thanks ^^ Do you have any ideas how in Vencord plugin receive Tray, which created by Vesktop? I will investigate more about all it.