-
Notifications
You must be signed in to change notification settings - Fork 1
Viewability Measurements
The Veeplay SDK performs automatic viewability testing since the implementation of VAST 4.0 support.
The SDK will issue these notifications whenever the Viewability state changes:
- VIEWABLE_IMPRESSION_VIEWABLE
- VIEWABLE_IMPRESSION_NOT_VIEWABLE
Starting with Veeplay SDK for Android 3.1.14, this mechanism has been extended.
By default, the only check the SDK makes is whether the player container is on screen or not. For cases where precise viewability measurements are needed, an advanced mode is provided where the player will look for any views that are obscuring the player container. This mode is disabled by default in order to improve performance whenever possible.
The player container is considered to be obscured if more than 50% of its area is covered by another view.
In order to activate the advanced viewability tracking mode, call the following method whenever initializing the player:
APSMediaPlayer.getInstance().setAdvancedViewabilityTracking(true);
Developers can programatically check the current viewability status by calling:
APSMediaPlayer.getInstance().isViewable()
A common scenario for viewability tracking is to autmatically play/pause when the player becomes visible/obscured.
This behaviour can be achieved by calling the following method while initializing the player:
APSMediaPlayer.getInstance().setAutoPauseWhenNotVisible(true);