Forum

Results 1 to 6 of 6

Thread: on mute event?

  1. #1
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317

    on mute event?

    Is there any event that can process on mute / unmute?

    Was coding a script for my music bot and can't find this event...

  2. #2
    Join Date
    September 2012
    Posts
    6,076
    If it is for your own client try onClientSelfVariableUpdateEvent, for other clients not 100% sure right now but onUpdateClientEvent might be called.
    You could then just check if they have their mic muted or not and do whatever you want to do.

  3. #3
    Join Date
    October 2012
    Location
    Germany
    Posts
    551
    Should be, try the CLIENT_IS_MUTED flag for local mute (you mute others via context menu), CLIENT_INPUT_MUTED for clients that mute themselves via getClientVariableAsInt.

  4. #4
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Thanks, I actually checked those but might have missed something.

    Btw how can I mute myself? I want my bot to mute when no one is in the channel or everyone is muted.

    I tried the close device functions but wouldn't work.

    I'm scripting in LUA.

    Edit: Fixed. Self muted with: setClientSelfVariableAsInt
    Last edited by barricas; March 15th, 2013 at 06:17 PM.

  5. #5
    Join Date
    October 2012
    Location
    Germany
    Posts
    551
    Code:
    local val = 1
    local error = ts3.setClientSelfVariableAsInt(serverConnectionHandlerID, ts3defs.ClientProperties.CLIENT_INPUT_DEACTIVATED, val)
    error = ts3.flushClientSelfUpdates(serverConnectionHandlerID)
    Would afaict be equivalent to what happens at Push to talk to just stop sending from the bot. Left out error handling for laziness ;D

    It appears to me the "muted you're after for those other clients might be either
    CLIENT_OUTPUT_MUTED = 6, -- automatically up-to-date for any client "in view", this clients headphones/speakers mute status
    or
    CLIENT_OUTPUTONLY_MUTED = 7, -- automatically up-to-date for any client "in view", this clients headphones/speakers only mute status

    rather than the ones I mentioned before. Don't ask me what the difference in those two is, the description puzzles me.
    Last edited by Philosound; March 15th, 2013 at 06:19 PM.

  6. #6
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    So.... I want to play a file via VLC when someone joins the channel (and when is only the bot in the channel) BUT only when there is no music playing so it doesn't interrupt. The VLC part works fine. But to check if music was playing, since the bot auto mutes when is alone, I used ts3.getClientSelfVariableAsInt with the CLIENT_FLAG_TALKING and it only returns 0 or 1. Shouldnt it return 2 if the bot is trying to "talk" when mute??

    local TalkStatus = {
    STATUS_NOT_TALKING = 0,
    STATUS_TALKING = 1,
    STATUS_TALKING_WHILE_DISABLED = 2
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Resolved] Mute while holding button (Push to mute)
    By Michael_Jim in forum Client Support
    Replies: 7
    Last Post: January 5th, 2015, 01:17 PM
  2. Replies: 1
    Last Post: October 24th, 2013, 12:48 PM
  3. [Resolved] [Suggestion] Push to mute : not toggle to mute
    By mcfrank in forum Suggestions and Feedback
    Replies: 2
    Last Post: February 21st, 2013, 08:09 PM
  4. Replies: 4
    Last Post: January 9th, 2011, 02:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •