com.brightcove.player.ads

## Interface AdPlayer<T>

- Type Parameters:
    `T` - the type of an Ad to handle.
  All Known Implementing Classes:
    ExoAdPlayer, PulseAdPlayer

      public interface AdPlayer<T>

  Represents the contract of an AdPlayer. AdPlayer is a player designed to play ads.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `AdPlayer.AdPlayerSettings`
    `static interface` | `AdPlayer.Listener<T>` Represents the callbacks from an `AdPlayer`.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addListener(AdPlayer.Listener<T> listener)` Adds a `AdPlayer.Listener`.
    `void` | `loadAd(T ad)` Loads an ad of type T.
    `void` | `pauseAd()` Pauses an ad.
    `void` | `playAd()` Plays an ad.
    `void` | `release()` Releases the `AdPlayer`.
    `void` | `removeListener(AdPlayer.Listener<T> listener)` Removes a `AdPlayer.Listener`.
    `void` | `seekTo(long position)` Seeks to the specified position.
    `void` | `skipAd()` Skips the current ad.

- - ### Method Detail

    - #### addListener

          void addListener(@NonNull
                           AdPlayer.Listener<T> listener)

      Adds a `AdPlayer.Listener`.
      Parameters:
        `listener` - listener to be added.

    - #### removeListener

          void removeListener(@NonNull
                              AdPlayer.Listener<T> listener)

      Removes a `AdPlayer.Listener`.
      Parameters:
        `listener` - listener to be removed.

    - #### loadAd

          void loadAd(@NonNull
                      T ad)

      Loads an ad of type T.
      Parameters:
        `ad` - ad to be loaded.

    - #### playAd

          void playAd()

      Plays an ad.

    - #### pauseAd

          void pauseAd()

      Pauses an ad.

    - #### seekTo

          void seekTo(long position)

      Seeks to the specified position.

    - #### release

          void release()

      Releases the `AdPlayer`.

    - #### skipAd

          void skipAd()

      Skips the current ad.