public class POBVideoRenderer extends java.lang.Object implements POBVideoRendering, POBVastPlayerListener, com.pubmatic.sdk.webrendering.ui.POBViewabilityTracker.onViewabilityChangedListener, POBVastPlayer.OnSkipButtonAppear
| Modifier and Type | Field and Description |
|---|---|
static int |
VIEWABILITY_THRESHOLD_PERCENT_FOR_BANNER |
| Constructor and Description |
|---|
POBVideoRenderer(POBVastPlayer vastPlayer,
com.pubmatic.sdk.webrendering.ui.POBViewabilityTracker viewabilityTracker,
java.lang.String placementType)
Constructs video renderer by using vast player, registers to setVastPlayerListener and
set max threshold for wrapper calls and set the linearity for the vast player
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
To do cleanup
|
void |
invalidateExpiration() |
void |
onFailedToPlay(com.pubmatic.sdk.common.POBError error)
Callback method, gets called when failed to load/play vast ad
Also notifies it to reference of PMHtmlRendererListener
|
void |
onOpenLandingPage(java.lang.String url)
Callback method, gets called when landing page is about to open
Open the url either in internal browser/ external browser or opens up specific app if url is
deep link supported and notifies specific PMHtmlRendererListener callbacks
|
void |
onPlaybackCompleted(float duration)
Notifies when video content is played completely and end card is about to show.
|
void |
onReadyToPlay(POBVastAd vastAd,
float skipOffset)
Callback method, gets called when content is available and Vast player is ready to ad
Also notifies it to reference of PMHtmlRendererListener
|
void |
onSkipButtonClick()
Callback method, gets called when skip button is about to click
Also notifies interaction callback to PMHtmlRendererListener reference
|
void |
onVideoEventOccurred(POBVastCreative.POBEventTypes eventType)
Notifies all vast event.
|
void |
onVideoStarted(float duration,
float playerVolume)
Notifies when first frame of video is rendered.
|
void |
onViewabilityChanged(boolean viewability) |
void |
prepareToDetach() |
void |
renderAd(com.pubmatic.sdk.common.base.POBAdDescriptor descriptor)
Callback method gets called to prepare ad play inside Vast player
|
void |
setAdRendererListener(com.pubmatic.sdk.common.base.POBAdRendererListener listener)
Registers to POBAdRendererListener
|
void |
setExpirationTimeout(long timeOut)
Sets an Ad expiration time out value in milli seconds.
|
void |
setMeasurementProvider(com.pubmatic.sdk.common.viewability.POBVideoMeasurementProvider measurementProvider) |
void |
setVideoRenderingListener(POBVideoRenderingListener listener)
Register to Video rendering listener to get POBVideoRenderingListener callbacks
|
void |
skipButtonAppear()
Callback to notify skip button is about to appear on vast player
|
public static final int VIEWABILITY_THRESHOLD_PERCENT_FOR_BANNER
public POBVideoRenderer(@NonNull
POBVastPlayer vastPlayer,
@NonNull
com.pubmatic.sdk.webrendering.ui.POBViewabilityTracker viewabilityTracker,
@NonNull
java.lang.String placementType)
vastPlayer - Vast Player instanceviewabilityTracker - instance of POBViewabilityTracker to track view visibilityplacementType - Placement type either 'interstitial' or 'inline'public void setMeasurementProvider(@Nullable
com.pubmatic.sdk.common.viewability.POBVideoMeasurementProvider measurementProvider)
public void setExpirationTimeout(long timeOut)
timeOut - Expiration time out value in milli secondspublic void renderAd(@NonNull
com.pubmatic.sdk.common.base.POBAdDescriptor descriptor)
renderAd in interface com.pubmatic.sdk.common.ui.POBBannerRenderingdescriptor - ad descriptorpublic void setAdRendererListener(@NonNull
com.pubmatic.sdk.common.base.POBAdRendererListener listener)
setAdRendererListener in interface com.pubmatic.sdk.common.ui.POBBannerRenderinglistener - ad renderer listenerpublic void prepareToDetach()
prepareToDetach in interface com.pubmatic.sdk.common.ui.POBBannerRenderingpublic void invalidateExpiration()
invalidateExpiration in interface com.pubmatic.sdk.common.ui.POBBannerRenderingpublic void setVideoRenderingListener(@Nullable
POBVideoRenderingListener listener)
setVideoRenderingListener in interface POBVideoRenderinglistener - the reference of POBVideoRenderingListenerpublic void destroy()
destroy in interface com.pubmatic.sdk.common.ui.POBBannerRenderingdestroy in interface POBVideoRenderingpublic void onReadyToPlay(@Nullable
POBVastAd vastAd,
float skipOffset)
onReadyToPlay in interface POBVastPlayerListenervastAd - selected vast adskipOffset - skip offset for skippable adspublic void onPlaybackCompleted(float duration)
POBVastPlayerListeneronPlaybackCompleted in interface POBVastPlayerListenerduration - selected media file durationpublic void onFailedToPlay(@NonNull
com.pubmatic.sdk.common.POBError error)
onFailedToPlay in interface POBVastPlayerListenererror - the error of POBVastError which has specific error codes with its specific errorpublic void onOpenLandingPage(@Nullable
java.lang.String url)
onOpenLandingPage in interface POBVastPlayerListenerurl - the url which gets called on landing pagepublic void onSkipButtonClick()
onSkipButtonClick in interface POBVastPlayerListenerpublic void onVideoStarted(float duration,
float playerVolume)
POBVastPlayerListeneronVideoStarted in interface POBVastPlayerListenerduration - selected media file durationplayerVolume - media player volumepublic void onVideoEventOccurred(POBVastCreative.POBEventTypes eventType)
POBVastPlayerListeneronVideoEventOccurred in interface POBVastPlayerListenereventType - event occured.public void onViewabilityChanged(boolean viewability)
onViewabilityChanged in interface com.pubmatic.sdk.webrendering.ui.POBViewabilityTracker.onViewabilityChangedListenerpublic void skipButtonAppear()
POBVastPlayer.OnSkipButtonAppearskipButtonAppear in interface POBVastPlayer.OnSkipButtonAppear