Interface PulseVideoAd
- All Superinterfaces:
PulseAd
PulseSession
about events
regarding an ad, and provides access to relevant properties.
You must notify this object of the following events:
- The ad has started:
adStarted()
- The ad playback position has changed:
adPositionChanged(float)
- The ad has played to completion:
adFinished()
- The ad failed to play:
adFailed(PulseAdError)
Depending on your application some of the other methods may need to be called in response to user interaction.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ooyala.pulse.PulseAd
PulseAd.Variant
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Notify the session that the user has opened the clickthrough link.void
adFailed
(PulseAdError error) Notify the session that, due to an error, the ad could not be played or that playback could not continue.void
Notify the session that the ad has played to completion.void
adPaused()
Notify the session that the ad has paused.void
adPositionChanged
(float position) Notify the session that the ad playback position has changed, either as a result of seeking or normal playback.void
Notify the session that the ad has resumed playback.void
Notify the session that the ad was skipped/closed by the user.void
Notify the session that the ad has started playing.void
adStarted
(float playerVolume) Notify the session that the ad has started playing and report the player volume.com.ooyala.pulse.Condition.Type
condition type indicating that an insertion point should be triggered when a certain event occurs (for example, the content is about to start).The pricing information for the ad.The ad system of the ad.The verification code used to inform ad vendor about ad playback details.The name of the advertiser.The identifier of the advertiser to which the ad belongs.The identifier of the campaign to which the ad belongs.int
The candidate ad number in the passback chain.The category labels identifying the ad's value.Returns a URL for a web page that should be displayed to the user when they tap the ad.The companions to show along with this ad.The custom identifier of the campaign to which the ad belongs; set in the Pulse UI.The custom identifier of the goal to which the ad belongs; set in the Pulse UI.The custom ad identifier set in the Pulse UI.The description of the ad.float
The duration information for the ad.The identifier of the goal to which the ad belongs.The ad identifier.float
The maximum time in seconds the SDK waits for a 'lazy' (not ready) ad to load (including potential passback candidate requests).Returns an array of media files for this ad.float
The amount of seconds from the start of the ad at which the button may first be displayed.float
The maximum time in seconds the end user should be allowed to wait for an ad to load before the ad must be discarded.'Survey' URL, if present.The resource files containing survey data.getTitle()
The title of the ad.The ad variant of the ad.boolean
Indicates whether this ad has passback ad sources available or not.boolean
A Boolean value that identifies a conditional ad.boolean
Indicates whether the OM SDK is enabled or not.boolean
Indicates whether the ad is part of an exclusive campaign.boolean
isReady()
Indicates whether the ad is ready to be displayed, or needs to be requested form the third party ad provider.boolean
Determine whether or not a skip button for the ad may be displayed.void
playerStateChanged
(PlayerState playerState) Notify all video listeners that the native video Player State has changed.void
playerVolumeChanged
(float videoPlayerVolume) Notify all video listeners that the native video player volume has changed.boolean
Indicates whether to show a remaining time countdown while this ad is being displayed.
-
Method Details
-
adStarted
void adStarted()Notify the session that the ad has started playing.This should only be called after your listener has been instructed to play the ad through
PulseSessionListener.startAdPlayback(PulseVideoAd, float)
and the user-visible phase of the ad has begun. -
adStarted
void adStarted(float playerVolume) Notify the session that the ad has started playing and report the player volume. The player volume is needed to make sure Open Measurement tracking is accurate.This should only be called after your listener has been instructed to play the ad through
PulseSessionListener.startAdPlayback(PulseVideoAd, float)
and the user-visible phase of the ad has begun.- Parameters:
playerVolume
- Player volume in a range between 0 and 1. Default value is 1.
-
adFinished
void adFinished()Notify the session that the ad has played to completion.After this, one of the following listener methods may be triggered:
PulseSessionListener.startAdPlayback(PulseVideoAd, float)
- if there are more ads in this ad breakPulseSessionListener.startContentPlayback()
- if there are no more ads and the content has not finishedPulseSessionListener.sessionEnded()
- otherwise
-
adSkipped
void adSkipped()Notify the session that the ad was skipped/closed by the user.After this, one of the following listener methods may be triggered:
PulseSessionListener.startAdPlayback(PulseVideoAd, float)
- if there are more ads in this ad breakPulseSessionListener.startContentPlayback()
- if there are no more ads and the content has not finishedPulseSessionListener.sessionEnded()
- otherwise
-
adPositionChanged
void adPositionChanged(float position) Notify the session that the ad playback position has changed, either as a result of seeking or normal playback.This may trigger preloadNextAd through
PulseSessionListener.preloadNextAd(PulseVideoAd)
if all of the conditions below are fulfilled:- Preload next ad feature is enabled for your Pulse account.
- There are more ads to be played in the current ad break.
- Time to preload next ad has been reached. This means that the remaining duration of current ad is less than or equal to what has been configured for preloading next ad.
- preloadNextAd has not already been triggered for the ad.
- Parameters:
position
- The ad position in seconds since start.
-
adClickThroughTriggered
void adClickThroughTriggered()Notify the session that the user has opened the clickthrough link. -
adPaused
void adPaused()Notify the session that the ad has paused. -
adResumed
void adResumed()Notify the session that the ad has resumed playback. -
adFailed
Notify the session that, due to an error, the ad could not be played or that playback could not continue.- Parameters:
error
- ThePulseAdError
that best describes the problem.
-
playerStateChanged
Notify all video listeners that the native video Player State has changed. This is related to viewability calculations when using OM SDK Integration.- Parameters:
playerState
- ThePlayerState
playerState that the video player has entered into.
-
playerVolumeChanged
void playerVolumeChanged(float videoPlayerVolume) Notify all video listeners that the native video player volume has changed. This is related to viewability calculations when using OM SDK Integration.- Parameters:
videoPlayerVolume
- from the native video player with a range between 0 and 1.
-
getMediaFiles
Returns an array of media files for this ad.Your application should choose the best media file to display based on size, bandwidth, and format considerations.
If none of the media files are supported by your video player, you should call
adFailed(PulseAdError)
withPulseAdError.NO_SUPPORTED_MEDIA_FILE
. -
getCompanions
List<PulseCompanionAd> getCompanions()The companions to show along with this ad. Bear in mind that only companion banners with resources of typeStaticResource
are returned.- Returns:
- The companion(s) for this ad.
-
getClickthroughURL
URL getClickthroughURL()Returns a URL for a web page that should be displayed to the user when they tap the ad.- Returns:
- the URL to be displayed.
-
isSkippable
boolean isSkippable()Determine whether or not a skip button for the ad may be displayed. If true, check the value ofgetSkipOffset()
, which is the amount of seconds from the start of the ad at which the button may first be displayed. When the viewer activates this button, calladSkipped()
.- Returns:
- Whether or not a skip button may be displayed after a given amount of time has passed.
-
getSkipOffset
float getSkipOffset()The amount of seconds from the start of the ad at which the button may first be displayed. If an PulseVideoAd is playing, and a call toisSkippable()
returns true, show a skip button after this amount of seconds has passed.- Returns:
- The amount of time in seconds which the ad must play for before a skip button can be shown,
provided that
isSkippable()
returns true.
-
getVariant
PulseAd.Variant getVariant()The ad variant of the ad.- Returns:
- The variant.
- See Also:
-
getTitle
String getTitle()The title of the ad.- Returns:
- A string that provides a common name for the ad
-
getIdentifier
String getIdentifier()The ad identifier.- Returns:
- The ad identifier.
-
isReady
boolean isReady()Indicates whether the ad is ready to be displayed, or needs to be requested form the third party ad provider.- Returns:
- true if the ad is ready to be displayed, otherwise false.
-
hasPassback
boolean hasPassback()Indicates whether this ad has passback ad sources available or not.- Returns:
- true if the ad has additional third party (passback) ad sources available.
-
getMaximumPreparationTime
float getMaximumPreparationTime()The maximum time in seconds the SDK waits for a 'lazy' (not ready) ad to load (including potential passback candidate requests).- Returns:
- The maximum preparation time in seconds.
-
getStartTimeout
float getStartTimeout()The maximum time in seconds the end user should be allowed to wait for an ad to load before the ad must be discarded.- Returns:
- The start timeout in seconds.
-
getCustomIdentifier
String getCustomIdentifier()The custom ad identifier set in the Pulse UI.- Returns:
- The custom ad identifier.
-
getCampaignIdentifier
String getCampaignIdentifier()The identifier of the campaign to which the ad belongs.- Returns:
- The campaign identifier of the ad.
-
getAdvertiserIdentifier
String getAdvertiserIdentifier()The identifier of the advertiser to which the ad belongs.- Returns:
- The identifier of advertiser.
-
getCustomCampaignIdentifier
String getCustomCampaignIdentifier()The custom identifier of the campaign to which the ad belongs; set in the Pulse UI.- Returns:
- The custom campaign identifier of the ad.
-
getGoalIdentifier
String getGoalIdentifier()The identifier of the goal to which the ad belongs.- Returns:
- The goal identifier of the ad.
-
getCustomGoalIdentifier
String getCustomGoalIdentifier()The custom identifier of the goal to which the ad belongs; set in the Pulse UI.- Returns:
- The custom goal identifier of the ad.
-
isPartOfAnExclusiveCampaign
boolean isPartOfAnExclusiveCampaign()Indicates whether the ad is part of an exclusive campaign.- Returns:
- true if the ad is part of an exclusive campaign, otherwise false.
-
shouldShowCountdown
boolean shouldShowCountdown()Indicates whether to show a remaining time countdown while this ad is being displayed.- Returns:
- true if a countdown should be shown while this ad is being displayed, otherwise false.
-
isConditionalAd
boolean isConditionalAd()A Boolean value that identifies a conditional ad.- Returns:
- True if the ad is conditional and should be used in all cases where the inline executable unit (such as VPAID) is not an ad but is instead a framework for finding an ad;
-
getSurvey
URL getSurvey()'Survey' URL, if present.- Returns:
- The survey URL.
-
getSurveys
The resource files containing survey data.- Returns:
- The list of AdSurvey
AdSurvey
, containing any resource relating to an integrated survey.
-
getCandidateNum
int getCandidateNum()The candidate ad number in the passback chain.- Returns:
- The candidate number of the ad.
-
getAdSystem
AdSystem getAdSystem()The ad system of the ad.- Returns:
- The information about the system that serves the ad.
-
getCategories
List<AdCategory> getCategories()The category labels identifying the ad's value.- Returns:
- The List of AdCategory
AdCategory
containing the categories of the Ad and their responsible authorities.
-
getDescription
String getDescription()The description of the ad.- Returns:
- A string value that describes a longer description of the ad..
-
getAdvertiser
String getAdvertiser()The name of the advertiser.- Returns:
- A string that provides the name of the advertiser as defined by the ad serving party.
-
getAdPricing
AdPricing getAdPricing()The pricing information for the ad.- Returns:
- The pricing information used to provide a value representing a price that can be used by real-time bidding (RTB) systems.
-
getAdVerifications
List<AdVerification> getAdVerifications()The verification code used to inform ad vendor about ad playback details.- Returns:
- A List containing the Verification elements
AdVerification
, which are used to initiate a controlled container where code can be executed for collecting data to verify ad playback details.
-
getAdBreakType
com.ooyala.pulse.Condition.Type getAdBreakType()condition type indicating that an insertion point should be triggered when a certain event occurs (for example, the content is about to start).- Returns:
- the condition's type
-
isOmsdkEnabled
boolean isOmsdkEnabled()Indicates whether the OM SDK is enabled or not.- Returns:
- true if OM SDK is enabled for your Pulse account, otherwise false.
-
getDuration
float getDuration()The duration information for the ad.- Returns:
- The playback duration of the creative in seconds.
-