Class ChromeCasts

java.lang.Object
su.litvak.chromecast.api.v2.ChromeCasts

public final class ChromeCasts extends Object
Utility class that discovers ChromeCast devices and holds references to all of them.
  • Method Details

    • get

      public static List<ChromeCast> get()
      Returns a copy of the currently seen chrome casts.
      Returns:
      a copy of the currently seen chromecast devices.
    • startDiscovery

      public static void startDiscovery() throws IOException
      Starts ChromeCast device discovery.
      Throws:
      IOException
    • startDiscovery

      public static void startDiscovery(InetAddress addr) throws IOException
      Starts ChromeCast device discovery.
      Parameters:
      addr - the address of the interface that should be used for discovery
      Throws:
      IOException
    • stopDiscovery

      public static void stopDiscovery() throws IOException
      Stops ChromeCast device discovery.
      Throws:
      IOException
    • restartDiscovery

      public static void restartDiscovery() throws IOException
      Restarts discovery by sequentially calling 'stop' and 'start' methods.
      Throws:
      IOException
    • restartDiscovery

      public static void restartDiscovery(InetAddress addr) throws IOException
      Restarts discovery by sequentially calling 'stop' and 'start' methods.
      Parameters:
      addr - the address of the interface that should be used for discovery
      Throws:
      IOException
    • registerListener

      public static void registerListener(ChromeCastsListener listener)
    • unregisterListener

      public static void unregisterListener(ChromeCastsListener listener)