com.brightcove.player

## Class OfflinePlaybackPlugin

- java.lang.Object
- - com.brightcove.player.OfflinePlaybackPlugin

- All Implemented Interfaces:
    LicenseManagerFactory

      public final class OfflinePlaybackPlugin
      extends java.lang.Object
      implements LicenseManagerFactory

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `OfflinePlaybackPlugin.Modules`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected LicenseManagerFactory` | `licenseManagerFactory` The factory that will be used to create `LicenseManager` instances.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OfflinePlaybackPlugin()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LicenseManager` | `createLicenseManager(Video video, Source source)` Creates a new instance of `LicenseManager`, which can be used to acquire, renew or releases (Offline) playback DRM license for a specific video source.
    `LicenseManager` | `createLicenseManager(Video video, Source source, java.util.Map<java.lang.String,java.lang.String> properties)`
    `static OfflinePlaybackPlugin` | `getInstance()` Provides reference to the single instance of `OfflinePlaybackPlugin`.
    `OfflinePlaybackPlugin` | `initialize(OfflinePlaybackPlugin.Modules modules)` Initializes the plugin by using the supplied modules to fulfill the required dependencies.

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

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

- - ### Field Detail

    - #### licenseManagerFactory

          @Inject
           @Nullable
          protected LicenseManagerFactory licenseManagerFactory

      The factory that will be used to create `LicenseManager` instances.

  - ### Constructor Detail

    - #### OfflinePlaybackPlugin

          public OfflinePlaybackPlugin()

  - ### Method Detail

    - #### getInstance

          @Singleton
          public static OfflinePlaybackPlugin getInstance()

      Provides reference to the single instance of `OfflinePlaybackPlugin`.
      Returns:
        reference to the single instance of `OfflinePlaybackPlugin`.

    - #### createLicenseManager

          @NonNull
          public LicenseManager createLicenseManager(@NonNull
                                                              Video video,
                                                              @NonNull
                                                              Source source)

      Description copied from interface: `LicenseManagerFactory`
      Creates a new instance of `LicenseManager`, which can be used to acquire, renew or releases (Offline) playback DRM license for a specific video source.
      Specified by:
        `createLicenseManager` in interface `LicenseManagerFactory`
      Parameters:
        `video` - reference to an offline playback enabled video.
        `source` - reference to the source in the video that requires an offline playback license operation.
      Returns:
        a new instance of `LicenseManager`

    - #### createLicenseManager

          public LicenseManager createLicenseManager(@NonNull
                                                     Video video,
                                                     @NonNull
                                                     Source source,
                                                     java.util.Map<java.lang.String,java.lang.String> properties)

      Specified by:
        `createLicenseManager` in interface `LicenseManagerFactory`

    - #### initialize

          public OfflinePlaybackPlugin initialize(@NonNull
                                                  OfflinePlaybackPlugin.Modules modules)

      Initializes the plugin by using the supplied modules to fulfill the required dependencies.
      Parameters:
        `modules` - the modules that should be used to initialize this plugin.
      Returns:
        reference to the plugin.
      Throws:
        `java.lang.IllegalStateException` - if the plugin has been initialized already.