public class CastManager
extends java.lang.Object
implements com.ooyala.android.CastManagerInterface
Modifier and Type | Class and Description |
---|---|
static class |
CastManager.CastManagerInitializationException |
Modifier and Type | Method and Description |
---|---|
void |
deregisterFromOoyalaPlayer()
Disconnect the currently registered OoyalaPlayer from the OOCastManager.
|
void |
destroy() |
void |
disconnectDevice()
Disconnects from the connected device.
|
void |
enterCastMode(com.ooyala.android.CastModeOptions options) |
static CastManager |
getCastManager() |
com.ooyala.android.player.PlayerInterface |
getCastPlayer()
For interacting with the cast playback, even when there is no OoyalaPlayer.
|
android.view.View |
getCastView() |
java.lang.String |
getDeviceName() |
void |
hideCastView()
Removes viewWeakReference from the OoyalaPlayer, for use after disconnecting from the receiver.
|
static void |
initialize(android.content.Context context,
java.lang.String NAMESPACE)
Set up the CastManager singleton.
|
boolean |
isConnectedToReceiverApp() |
boolean |
isInCastMode() |
void |
onApplicationConnected(com.google.android.gms.cast.framework.CastSession castSession)
Called when application is connected from remote device
|
void |
onApplicationDisconnect(com.google.android.gms.cast.framework.CastSession castSession)
Called when application is disconnected from remote device
|
void |
registerWithOoyalaPlayer(com.ooyala.android.OoyalaPlayer ooyalaPlayer)
Connect the CastManager to the OoyalaPlayer instance.
|
void |
setAdditionalInitParams(java.util.Map<java.lang.String,java.lang.String> params)
Provide key-value pairs that will be passed to the Receiver upon Cast Playback.
|
void |
setCastView(android.view.View view)
Set the view to display while casting
|
void |
setMiniControllerView(android.view.View miniControllerViewWeakReference) |
public static void initialize(android.content.Context context, java.lang.String NAMESPACE) throws CastManager.CastManagerInitializationException
context
- an Android context. Non-null.NAMESPACE
- the name of namespace for custom event busCastManager.CastManagerInitializationException
- if initialization fails.public void setMiniControllerView(android.view.View miniControllerViewWeakReference)
public static CastManager getCastManager()
initialize(android.content.Context, String)
public void setAdditionalInitParams(java.util.Map<java.lang.String,java.lang.String> params)
params
- the set of key/values that will be added to the Receiver on Initpublic void destroy()
public void setCastView(android.view.View view)
view
- to display in the video area while casting. Possibly null.getCastView()
public android.view.View getCastView()
the view that is displayed during Cast playback
public void hideCastView()
public boolean isConnectedToReceiverApp()
isConnectedToReceiverApp
in interface com.ooyala.android.CastManagerInterface
public com.ooyala.android.player.PlayerInterface getCastPlayer()
getCastPlayer
in interface com.ooyala.android.CastManagerInterface
public void registerWithOoyalaPlayer(com.ooyala.android.OoyalaPlayer ooyalaPlayer)
registerWithOoyalaPlayer
in interface com.ooyala.android.CastManagerInterface
ooyalaPlayer
- must not be null.deregisterFromOoyalaPlayer()
public boolean isInCastMode()
isInCastMode
in interface com.ooyala.android.CastManagerInterface
public void enterCastMode(com.ooyala.android.CastModeOptions options)
enterCastMode
in interface com.ooyala.android.CastManagerInterface
public final void disconnectDevice()
public void onApplicationConnected(com.google.android.gms.cast.framework.CastSession castSession)
castSession
- current session which is connectedpublic void onApplicationDisconnect(com.google.android.gms.cast.framework.CastSession castSession)
castSession
- current session which is disconnectedpublic java.lang.String getDeviceName()
public void deregisterFromOoyalaPlayer()
Copyright 2018 Brightcove, Inc. All Rights Reserved.