This library provides simple API for integrating some of RaidVoice features. RaidVoice addon is my main project that enables people to see each other when speaking on external voice chat like TeamSpeak or Ventrillo. Purpose of this library is to hook global function UnitIsTalking and to provide custom voice events that can be embedded in other addons, mainly targeting unitframes. The unitframes can then capture and broadcast voice events and use the global function to show who is speaking over external voicechat.
How it works:
Library should snoop on RaidVoice communication an use small cache to store who is speaking. When voice status of any players changes callback will be fired.Detailed description of API will be provided when implementation is finished. For more information on the subject see RaidVoice addon page.
Example usage:
In your addon register the library and calls your function - voiceUpdate in this example
event is only one RAIDVOICE_UPDATE
local RV = LibStub('libRaidVoice-1.0') function addon:OnEnable() RV.RegisterCallback(addon, "RAIDVOICE_UPDATE") end function addon:RAIDVOICE_UPDATE() -- random updating code for unit, frame in self:RandomFrameIterateFunction() do if unit and UnitIsTalking(UnitName(unit)) then self:ShowVoiceIcon(frame) else self:HideVoiceIcon(frame) end end end --how to broadcast voice events: --bind keys to RV:playerStartsSpeaking() RV:playerStopsSpeaking() --Or enable blizz voice chat, set voice sensitivy and call: RV:useVoiceActivation(true) (optional) RV:setVoiceUpdatePeriod(2) --update period in seconds --This can be disabled using: RV:useVoiceActivation(false) --how to hide blizz voice box with player name VoiceChatTalkers:UnregisterAllEvents(); VoiceChatTalkers:SetScript("OnLoad",nil); VoiceChatTalkers:SetScript("OnUpdate",nil); VoiceChatTalkers:SetScript("OnEnter",nil); VoiceChatTalkers:SetScript("OnEvent",nil); VoiceChatTalkers:Hide();
global functions:
UnitIsTalking(playerName) - returns 1 if player is speaking on external voichat or when speaking over Blizzard voicechat, nil if not speaking.
do NOT use IsVoiceChatEnabled to test for voicechat existence this function returns 1 only if blizz voicechat is enabled, it does not check external voicechats that use raidvoice
Facts
- Date created
- 01 Nov 2009
- Categories
- Last update
- 16 Nov 2009
- Development stage
- Beta
- License
- GNU General Public License version 3 (GPLv3)
- Curse link
- libRaidVoice
- Recent files
- B: libRaidVoice-0.5beta for 3.2.0 on 16 Nov 2009
- B: libRaidVoice-0.4beta for 3.2.0 on 14 Nov 2009
- B: libRaidVoice-0.3beta for 3.2.0 on 10 Nov 2009
- B: LibRaidVoice-0.1beta for 3.2.0 on 06 Nov 2009
- A: libRaidVoice-0.1alpha1 for 3.2.0 on 02 Nov 2009