Package 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 ClassesModifier and TypeInterfaceDescriptionstatic classstatic interfaceRepresents the callbacks from anAdPlayer. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(AdPlayer.Listener<T> listener) Adds aAdPlayer.Listener.voidLoads an ad of type T.voidpauseAd()Pauses an ad.voidplayAd()Plays an ad.voidrelease()Releases theAdPlayer.voidremoveListener(AdPlayer.Listener<T> listener) Removes aAdPlayer.Listener.voidseekTo(long position) Seeks to the specified position.voidskipAd()Skips the current ad.
-
Method Details
-
addListener
Adds aAdPlayer.Listener.- Parameters:
listener- listener to be added.
-
removeListener
Removes aAdPlayer.Listener.- Parameters:
listener- listener to be removed.
-
loadAd
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 theAdPlayer. -
skipAd
void skipAd()Skips the current ad.
-