public class POBVideoRenderer extends java.lang.Object implements POBVideoRendering, POBVastPlayerListener, POBVastPlayerListener.POBAutoClickEventListener, com.pubmatic.sdk.webrendering.ui.POBViewabilityTracker.OnViewabilityChangedListener, com.pubmatic.sdk.webrendering.ui.POBOnSkipOptionUpdateListener
POBVastPlayerListener.POBAutoClickEventListener| 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 |
disableIconClickCallbacks()
To disable industry icon related click callbacks.
|
void |
invalidateExpiration() |
void |
onAutoClickEvent()
Notifies for Click Event when actt is enabled
|
void |
onClose()
Callback method which notifies interaction callback to PMHtmlRendererListener reference
|
void |
onEndCardWillLeaveApp()
Notifies if end card leaves app
|
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 |
onIndustryIconClick(java.lang.String url)
Callback method, gets called when landing page is about to open on industry icon click.
|
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 |
onSkip()
Callback method, gets called when skip button is about to click
|
void |
onSkipOptionUpdate(boolean isEnable) |
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 |
proceedAdSkip(boolean skip)
Method to notify video renderer to proceed to skip
depending on skip parameter value.
|
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 |
setVideoSkipEventListener(POBVideoSkipEventListener listener)
Registers to POBVideoSkipEventListener to get video skip related callbacks
|
void |
shouldForwardClickEvent()
Notifies whether click should be forwarded or not
Note: This event should be fired in case of MRAID end card click
|
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 disableIconClickCallbacks()
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(@Nullable
com.pubmatic.sdk.common.base.POBAdRendererListener listener)
setAdRendererListener in interface com.pubmatic.sdk.common.ui.POBBannerRenderinglistener - ad renderer listenerpublic 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 setVideoSkipEventListener(@Nullable
POBVideoSkipEventListener listener)
POBVideoRenderingsetVideoSkipEventListener in interface POBVideoRenderinglistener - reference of POBVideoSkipEventListenerpublic void proceedAdSkip(boolean skip)
POBVideoRenderingproceedAdSkip in interface POBVideoRenderingskip - Value for skippublic 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 onIndustryIconClick(@Nullable
java.lang.String url)
onIndustryIconClick in interface POBVastPlayerListenerurl - the url which gets called on landing pagepublic void shouldForwardClickEvent()
POBVastPlayerListenershouldForwardClickEvent in interface POBVastPlayerListenerpublic void onEndCardWillLeaveApp()
POBVastPlayerListeneronEndCardWillLeaveApp in interface POBVastPlayerListenerpublic void onSkip()
onSkip in interface POBVastPlayerListenerpublic void onClose()
onClose in interface POBVastPlayerListenerpublic void onVideoStarted(float duration,
float playerVolume)
POBVastPlayerListeneronVideoStarted in interface POBVastPlayerListenerduration - selected media file durationplayerVolume - media player volumepublic void onVideoEventOccurred(@NonNull
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 onSkipOptionUpdate(boolean isEnable)
onSkipOptionUpdate in interface com.pubmatic.sdk.webrendering.ui.POBOnSkipOptionUpdateListenerpublic void onAutoClickEvent()
POBVastPlayerListener.POBAutoClickEventListeneronAutoClickEvent in interface POBVastPlayerListener.POBAutoClickEventListener