Class CastSupport

java.lang.Object
com.appscend.media.CastSupport

public final class CastSupport extends Object
Google Cast entry point. Cast lives in the optional veeplay-player-android-cast artifact; without it every method here is a no-op.
  • Method Details

    • isAvailable

      public static boolean isAvailable()
      Returns:
      true if the Cast artifact is on the classpath
    • isStarted

      public static boolean isStarted()
      Returns:
      true once enable(Activity) has obtained a CastContext, until release()
    • enable

      public static void enable(android.app.Activity activity)
      Starts Cast and registers the Cast renderer. Call on the main thread.
    • release

      public static void release()
    • createRouteButton

      public static android.view.View createRouteButton(android.content.Context context)
      Returns:
      a Cast route button, or null if Cast hasn't started
    • castState

      public static int castState()
      Returns:
      a VeeplayCastState value, or 0 if Cast hasn't started
    • addObserver

      public static void addObserver(CastStateObserver o)
    • removeObserver

      public static void removeObserver(CastStateObserver o)