Class WsAlertsPollsHandler

java.lang.Object
tv.phantombot.panel.WsAlertsPollsHandler
All Implemented Interfaces:
WsFrameHandler

public class WsAlertsPollsHandler extends Object implements WsFrameHandler
Author:
gmt2001
  • Constructor Details

    • WsAlertsPollsHandler

      public WsAlertsPollsHandler(String panelAuthRO, String panelAuth)
  • Method Details

    • register

      public WsFrameHandler register()
      Description copied from interface: WsFrameHandler
      Registers this WsFrameHandler with the WebSocketFrameHandler
      Specified by:
      register in interface WsFrameHandler
      Returns:
    • getAuthHandler

      public WsAuthenticationHandler getAuthHandler()
      Description copied from interface: WsFrameHandler
      Gets the WsAuthenticationHandler assigned to this endpoint
      Specified by:
      getAuthHandler in interface WsFrameHandler
      Returns:
      An WsAuthenticationHandler
    • handleFrame

      public void handleFrame(ChannelHandlerContext ctx, WebSocketFrame frame)
      Description copied from interface: WsFrameHandler
      Handles the WebSocket frame and sends a response back to the client, if necessary Only gets called if the WsAuthenticationHandler returned true
      Specified by:
      handleFrame in interface WsFrameHandler
      Parameters:
      ctx - The ChannelHandlerContext of the session
      frame - The WebSocketFrame to process
    • sendJSONToAll

      public void sendJSONToAll(String jsonString)
    • triggerAudioPanel

      public void triggerAudioPanel(String audioHook)
    • triggerAudioPanel

      public void triggerAudioPanel(String audioHook, boolean ignoreIsPlaying)
    • triggerAudioPanel

      public void triggerAudioPanel(String audioHook, float volume)
    • triggerAudioPanel

      public void triggerAudioPanel(String audioHook, float volume, boolean ignoreIsPlaying)
    • stopMedia

      public void stopMedia()
    • stopMedia

      public void stopMedia(String type)
    • alertImage

      public void alertImage(String imageInfo)
    • alertImage

      public void alertImage(String imageInfo, boolean ignoreIsPlaying)
    • playVideo

      public void playVideo(String filename)
    • playVideo

      public void playVideo(String filename, int durationMs)
    • playVideo

      public void playVideo(String filename, boolean fullscreen)
    • playVideo

      public void playVideo(String filename, int durationMs, boolean fullscreen)
    • triggerEmotes

      public void triggerEmotes(String emoteString)
      Takes a string to parse and trigger one or more emotes. Each emote entry is separated by a '/'. An emote describes its occurrences in the (here not relevant) string in simple start-stop notation. Multiple occurrences are separated by a comma.

      This is the default method that handles Twitch style emotes and uses the default emote provider Twitch

      Parameters:
      emoteString - a string in format of Twitch's emote format e.g. "425618:0-2,4-6,8-10/145315:12-24"
    • triggerEmotes

      public void triggerEmotes(String[] emotes, String provider)
    • triggerEmote

      public void triggerEmote(String image)
    • triggerEmote

      public void triggerEmote(String image, int amount)
    • triggerEmote

      public void triggerEmote(String image, String provider)
    • triggerEmote

      public void triggerEmote(String emoteId, int amount, String provider)
    • triggerEmote

      public void triggerEmote(String emoteId, int amount, String provider, boolean ignoreSleep)
    • triggerEmoteAnimation

      public void triggerEmoteAnimation(String emoteId, int amount, String provider, String animationName, int duration, boolean ignoreSleep)
    • sendMacro

      public void sendMacro(String macroJson)
      Sends a macro to be played by the alerts overlay
      Parameters:
      macroJson - A json string with commands
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object