AdPlayerPlacementView APIs - Android

Creating instances of AdPlayerPlacementView and attaching a player tag to it is described in the Displaying a Player section.

This section provides description of the other APIs available on the AdPlayerPlacementView, except for the floating scope API that is described in the Floating Templates section.

Basic Parameters

Parameter Name

Parameter Type

Parameter Description

Parameter Name

Parameter Type

Parameter Description

playerTagId

String (optional)

The ID of the AdPlayerTag attached to this placement.

label

String (optional)

A convenience field to ease the identification of AdPlayerPlacementViews in log records.

Display

Parameter Name

Parameter Type

Parameter Description

Parameter Name

Parameter Type

Parameter Description

priority

Int (1-999)

In case more than one placement is visible on the screen, a priority can be set to decide which one should play. This value is configurable between 1 and 999. In case one or more of the placements are partially visible, the playing placement will be selected based on the highest value of priority times visible percent. In any case, user interactions with the player and API calls will override the priority.

animateAppearance

Boolean

Defines weather the appearance of new placements on the screen should be animated. Is false by default for instream tags and true for outstream tags.

appearanceAnimationDuration

Long

The duration of the appearance animation in milliseconds if animateAppearance is set to true.

appearOnPlay

Boolean

When set to false, the placement will appear on the screen immediately when the attached tag is available. Otherwise, the placement will appear on the screen only when the tag starts to play video. Is false by default for instream tags and true for outstream tags.

allowFloatingAbove

Boolean

In case the player in this AdPlayerPlacementView is defined as "Floating", this property will determine whether or not it can be floating above this AdPlayerPlacementView (when this placement is being scrolled down) in addition to being floating below this AdPlayerPlacementView (when this placement is being scrolled up).

Controls

Display

  • close() prevents the player from appearing in this placement again unless the screen (Activity\Fragment) is recreated.

Â