Interface PulseVideoAd
- 
- All Superinterfaces:
 PulseAd
public interface PulseVideoAd extends PulseAd
This interface is used to notify the owningPulseSessionorPulseLiveSessionabout 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadClickThroughTriggered()Notify the session that the user has opened the clickthrough link.voidadFailed(PulseAdError error)Notify the session that, due to an error, the ad could not be played or that playback could not continue.voidadFinished()Notify the session that the ad has played to completion.voidadPaused()Notify the session that the ad has paused.voidadPositionChanged(float position)Notify the session that the ad playback position has changed, either as a result of seeking or normal playback.voidadResumed()Notify the session that the ad has resumed playback.voidadSkipped()Notify the session that the ad was skipped/closed by the user.voidadStarted()Notify the session that the ad has started playing.voidadStarted(float playerVolume)Notify the session that the ad has started playing and report the player volume.com.ooyala.pulse.Condition.TypegetAdBreakType()condition type indicating that an insertion point should be triggered when a certain event occurs (for example, the content is about to start).AdPricinggetAdPricing()The pricing information for the ad.AdSystemgetAdSystem()The ad system of the ad.java.util.List<AdVerification>getAdVerifications()The verification code used to inform ad vendor about ad playback details.java.lang.StringgetAdvertiser()The name of the advertiser.java.lang.StringgetAdvertiserIdentifier()The identifier of the advertiser to which the ad belongs.java.lang.StringgetCampaignIdentifier()The identifier of the campaign to which the ad belongs.intgetCandidateNum()The candidate ad number in the passback chain.java.util.List<AdCategory>getCategories()The category labels identifying the ad's value.java.net.URLgetClickthroughURL()Returns a URL for a web page that should be displayed to the user when they tap the ad.java.util.List<PulseCompanionAd>getCompanions()The companions to show along with this ad.java.lang.StringgetCustomCampaignIdentifier()The custom identifier of the campaign to which the ad belongs; set in the Pulse UI.java.lang.StringgetCustomGoalIdentifier()The custom identifier of the goal to which the ad belongs; set in the Pulse UI.java.lang.StringgetCustomIdentifier()The custom ad identifier set in the Pulse UI.java.lang.StringgetDescription()The description of the ad.floatgetDuration()The duration information for the ad.java.lang.StringgetGoalIdentifier()The identifier of the goal to which the ad belongs.java.lang.StringgetIdentifier()The ad identifier.floatgetMaximumPreparationTime()The maximum time in seconds the SDK waits for a 'lazy' (not ready) ad to load (including potential passback candidate requests).java.util.List<MediaFile>getMediaFiles()Returns an array of media files for this ad.floatgetSkipOffset()The amount of seconds from the start of the ad at which the button may first be displayed.floatgetStartTimeout()The maximum time in seconds the end user should be allowed to wait for an ad to load before the ad must be discarded.java.net.URLgetSurvey()'Survey' URL, if present.java.util.List<AdSurvey>getSurveys()The resource files containing survey data.java.lang.StringgetTitle()The title of the ad.PulseAd.VariantgetVariant()The ad variant of the ad.booleanhasPassback()Indicates whether this ad has passback ad sources available or not.booleanisConditionalAd()A Boolean value that identifies a conditional ad.booleanisOmsdkEnabled()Indicates whether the OM SDK is enabled or not.booleanisPartOfAnExclusiveCampaign()Indicates whether the ad is part of an exclusive campaign.booleanisReady()Indicates whether the ad is ready to be displayed, or needs to be requested form the third party ad provider.booleanisSkippable()Determine whether or not a skip button for the ad may be displayed.voidplayerStateChanged(PlayerState playerState)Notify all video listeners that the native video Player State has changed.voidplayerVolumeChanged(float videoPlayerVolume)Notify all video listeners that the native video player volume has changed.booleanshouldShowCountdown()Indicates whether to show a remaining time countdown while this ad is being displayed. 
 - 
 
- 
- 
Method Detail
- 
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
void adFailed(PulseAdError error)
Notify the session that, due to an error, the ad could not be played or that playback could not continue.- Parameters:
 error- ThePulseAdErrorthat best describes the problem.
 
- 
playerStateChanged
void playerStateChanged(PlayerState playerState)
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- ThePlayerStateplayerState 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
java.util.List<MediaFile> 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.- Returns:
 - A 
ListofMediaFileinstances. 
 
- 
getCompanions
java.util.List<PulseCompanionAd> getCompanions()
The companions to show along with this ad. Bear in mind that only companion banners with resources of typeStaticResourceare returned.- Returns:
 - The companion(s) for this ad.
 
 
- 
getClickthroughURL
java.net.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:
 PulseAd.Variant
 
- 
getTitle
java.lang.String getTitle()
The title of the ad.- Returns:
 - A string that provides a common name for the ad
 
 
- 
getIdentifier
java.lang.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
java.lang.String getCustomIdentifier()
The custom ad identifier set in the Pulse UI.- Returns:
 - The custom ad identifier.
 
 
- 
getCampaignIdentifier
java.lang.String getCampaignIdentifier()
The identifier of the campaign to which the ad belongs.- Returns:
 - The campaign identifier of the ad.
 
 
- 
getAdvertiserIdentifier
java.lang.String getAdvertiserIdentifier()
The identifier of the advertiser to which the ad belongs.- Returns:
 - The identifier of advertiser.
 
 
- 
getCustomCampaignIdentifier
java.lang.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
java.lang.String getGoalIdentifier()
The identifier of the goal to which the ad belongs.- Returns:
 - The goal identifier of the ad.
 
 
- 
getCustomGoalIdentifier
java.lang.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
java.net.URL getSurvey()
'Survey' URL, if present.- Returns:
 - The survey URL.
 
 
- 
getSurveys
java.util.List<AdSurvey> 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
java.util.List<AdCategory> getCategories()
The category labels identifying the ad's value.- Returns:
 - The List of AdCategory 
AdCategorycontaining the categories of the Ad and their responsible authorities. 
 
- 
getDescription
java.lang.String getDescription()
The description of the ad.- Returns:
 - A string value that describes a longer description of the ad..
 
 
- 
getAdvertiser
java.lang.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
java.util.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.
 
 
 - 
 
 -