-
Notifications
You must be signed in to change notification settings - Fork 48
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
User names in voice events become null when muting or moving channel #88
Comments
Glad to hear! Just checked - seems this part is badly documented and probably needs some enhancements. You have two options. Either listen to 'voice-start' and 'voice-end' events or alternatively use the 'voice-frame' event. Looking at the documentation, these don't seem to be documented there, but they do exist and can be seen in the code.
The first one will give you quick event based access that should make "display icon"/"hide icon" actions easy to implement, but it won't let you query the connection for a snapshot of "Who is talking at the moment?". You can also take a look at the following project, which should implement something similar: Specifically it seems to be using a hybrid approach where |
Thanks, that worked perfectly! 👍 |
Hmm... it seems like there's either a bug or I'm doing something wrong. Whenever I do some kind of action (mute / unmute, move channel, etc.), the name value in each event suddenly becomes null. If either I rejoin the server or I reconnect the bot it seems to fix itself. Any idea what might cause that? |
Which event are you using? |
Currently voice-start to show the name in the list and voice-end to remove it. There are another couple of layers of event passing as well but I'm guessing they're not the problem since I'm just directly copying fields from one object to another. |
So, I kind of forgot all about this for a while, but I just tried switching to the voice-frame method and apparently the null username issue is still persisting (although it's better anyway so it wasn't waste of time). It would be great to figure out any kind of workaround for this. I've pretty much no idea what's causing this to happen. |
Dammit. :) I think there's been multiple people reporting this now, but I've yet to be able to replicate it myself. I'd love a piece of code and instructions to reproduce this issue. The annoying bit is that I'm guessing the actual bug is something stupid simple. |
So, I've been doing other things for the last couple of days; I have no attention span... but anyway... I've actually been trying to make a NodeCG bundle. I've not really done much of it yet so the whole thing is a bit messy and probably half-broken, but the bit that's giving me trouble is something to this effect: mumble.on("voice-frame", function(frames) {
for (var f in frames) {
if (frames[f].user) {
// When stuff starts to break, this will start dumping stuff to the console.
// Interestingly, most of the data is intact, just none of the ID/name related stuff.
if (frames[f].user.name === null) {
console.log(frames[f].user)
}
// This is the actual code that I'd use assuming I can help solve this issue :)
if (frames[f].user.talking) {
nodecg.sendMessage("user-talking", {name: frames[f].user.name, state: true})
}
}
}
}) Hopefully this helps to some extent! 🙏 |
Ended up testing status messages, ie. self mute/deaf/etc. Those reset the names and such. This issue is now fixed - hopefully I didn't introduce other issues in its place. |
Yay! Thank you. 👍
|
Hi! First of all, thanks for making this library; it's working great so far!
I've done a bit of looking through the API and there doesn't seem to be a way of getting a list of everyone currently transmitting audio (my goal is to have a little web-based widget that will show all the people currently talking). The way I've thought of going about it is to get the audio streams of each user in a channel, then check if the volume is above a certain level. The problem with this is I'd then have to keep track of everyone joining and leaving, and also open a lot of streams at the same time.
I'm just wondering if there's an easier way I've overlooked, or if something could be implemented. Or is this just a Mumble limitation?
The text was updated successfully, but these errors were encountered: