Package com.castlabs.android

## Class Plugin

- java.lang.Object
- - com.castlabs.android.Plugin

- Direct Known Subclasses:
    `DefaultPlayerPlugin`

      public abstract class Plugin
      extends Object

  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

    Constructors
    Constructor | Description
    --- | ---
    `Plugin()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract String` | `getId()` |
    `void` | `init​(Context context)` | 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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Plugin

          public Plugin()

  - ### Method Detail

    - #### init

          public void init​(Context context)

      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

          @NonNull
          public abstract String 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) configuration
        `remoteConfiguration` - the remote configuration