Class CastSupport
java.lang.Object
com.appscend.media.CastSupport
Google Cast entry point. Cast lives in the optional veeplay-player-android-cast artifact;
without it every method here is a no-op.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic intstatic android.view.ViewcreateRouteButton(android.content.Context context) static voidenable(android.app.Activity activity) Starts Cast and registers the Cast renderer.static booleanstatic booleanstatic voidrelease()static void
-
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, untilrelease()
-
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
VeeplayCastStatevalue, or 0 if Cast hasn't started
-
addObserver
-
removeObserver
-