Interface SurfaceViewabilityListener
-
- All Implemented Interfaces:
public interface SurfaceViewabilityListenerInterface for handling video surface viewability changes.
This listener provides callbacks for viewability-related events that determine when video playback should start, pause, or when the surface becomes available. It is typically used in conjunction with viewability tracking to control video playback based on whether the video surface is visible to the user.
-
-
Method Summary
Modifier and Type Method Description abstract UnitplayVideo()Called when the video should start playing. abstract UnitpauseVideo()Called when the video should be paused. abstract UnitonSurfaceTextureAvailable()Called when the surface texture becomes available for rendering. -
-
Method Detail
-
playVideo
abstract Unit playVideo()
Called when the video should start playing.
This method is invoked when the video surface becomes viewable and meets the criteria for starting video playback, such as being sufficiently visible on screen according to viewability requirements.
-
pauseVideo
abstract Unit pauseVideo()
Called when the video should be paused.
This method is invoked when the video surface becomes non-viewable or no longer meets the criteria for active playback, such as being scrolled out of view or obscured by other content.
-
onSurfaceTextureAvailable
abstract Unit onSurfaceTextureAvailable()
Called when the surface texture becomes available for rendering.
This method is invoked when the underlying surface texture is ready to receive video frames, indicating that the video player can begin or resume rendering video content to the surface.
-
-
-
-