BitmovinCastManager
open class BitmovinCastManager
Singleton providing access to GoogleCast related features. The BitmovinCastManager needs to be initialized in the Application, if casting should be used.
Note: Make sure to call updateContext on every Activitys switch. On devices where casting is unavailable, Cast operations are no-ops and return false when applicable.
Properties
Functions
| Name | Summary |
|---|---|
| addMessageReceivedCallback | open fun addMessageReceivedCallback(callback: Cast.MessageReceivedCallback) Adds a MessageReceivedCallback to the BitmovinCastManager. |
| disconnect | open fun disconnect() Disconnects from the current cast session. |
| getCastControllerActivityClass | open fun getCastControllerActivityClass(): Class Returns the class of the expanded controller activity, used at initialization. |
| initialize | open fun initialize() open fun initialize(castControllerActivity: Class) open fun initialize(applicationId: String, messageNamespace: String) open fun initialize(@NullableapplicationId: String, messageNamespace: String, castControllerActivity: Class) Initializes the BitmovinCastManager. |
| isCastAvailable | open fun isCastAvailable(): Boolean Indicates whether Google Cast has been initialized and is available. |
| isConnected | open fun isConnected(): Boolean Returns true if currently connected to a cast session. |
| isConnecting | open fun isConnecting(): Boolean Returns true if currently connecting to a cast session. |
| isInitialized | open fun isInitialized(): Boolean |
| removeMessageReceivedCallback | open fun removeMessageReceivedCallback(callback: Cast.MessageReceivedCallback) Removes a MessageReceivedCallback from the BitmovinCastManager. |
| sendMessage | open fun sendMessage(message: String): Boolean Sends the given message to the cast receiver. open fun sendMessage(message: String, @NullablemessageNamespace: String): Boolean Sends the given message to the cast receiver on the provided messageNamespace. |
| sendMetadata | open fun Sends the given metadata wrapped in a metadata message object to the cast receiver on the configured message namespace. |
| showDialog | open fun showDialog(): Boolean Opens the cast dialog, for selecting and starting a cast session. |
| updateContext | open fun updateContext(context: Context) Must be called in every Activity to update the context. |