Package com.castlabs.android
Class Plugin
java.lang.Object
com.castlabs.android.Plugin
- Direct Known Subclasses:
DefaultPlayerPlugin
,HlsInterstitialPlugin
Simple plugin interface that is used to register components with the castLabs SDK.
Implementations of this interface can be registered using
PlayerSDK.register(Plugin)
.- Since:
- 3.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
getId()
void
This method is called on registered plugins after the player SDK was successfully initialized.void
onRemotePlay
(Bundle localConfiguration, JSONObject remoteConfiguration) Invoked whenever starting remote play (ie.
-
Constructor Details
-
Plugin
public Plugin()
-
-
Method Details
-
init
This method is called on registered plugins after the player SDK was successfully initialized. Note that if this method fails to initialize, the plugin should un-register itself cleanly.- Parameters:
context
- The application context
-
getId
- Returns:
- The plugin ID or null
-
onRemotePlay
public void onRemotePlay(@NonNull Bundle localConfiguration, @NonNull JSONObject remoteConfiguration) Invoked whenever starting remote play (ie. Chromecast). Concrete Plugins which have relevant data should override this method and map the appropriate data.- Parameters:
localConfiguration
- the local (SDK) configurationremoteConfiguration
- the remote configuration
-