Interface FriendlyAdObstructions


public interface FriendlyAdObstructions

Friendly obstructions are views such as video controls that are essential to the user’s experience but do not impact viewability. Once registered as such, these controls are excluded from ad viewability measurements. These controls must only be fully transparent overlays or small buttons. Any other non-control views must not be registered.

When ad viewability via the OMSDK is calculated, all views overlaying the media element are considered obstructions and reduce the viewability rate.

You may register:

  • A transparent overlay used to capture user taps.
  • Transient buttons such as:
    • Pause
    • Play
    • Fullscreen
    • Cast/AirPlay
    • Collapse
    • Progress/Seek
    • Other playback relevant actions

You must NOT register:

  • Watermarks
  • Pop ups
  • Dialogs
  • Non-transient buttons

For more information, see Open Measurement SDK.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(View friendlyObstruction)
    Deprecated.
    Deprecated.
    List<View>
    Deprecated.
    void
    remove(View friendlyObstruction)
    Deprecated.
    void
    Used to remove all elements marked as friendly advertising obstructions.
  • Method Details

    • add

      @Deprecated void add(View friendlyObstruction)
      Deprecated.
      Deprecated. Use add(FriendlyAdObstruction) instead.

      Used to add View elements as friendly advertising obstructions. Will use FriendlyAdObstruction.Purpose.OTHER by default.

      Parameters:
      friendlyObstruction - the View element appearing on top of the player's view during ad playback.
    • remove

      @Deprecated void remove(View friendlyObstruction)
      Deprecated.
      Deprecated. Use remove(FriendlyAdObstruction) instead.

      Used to remove View elements previously marked as friendly advertising obstructions.

      Parameters:
      friendlyObstruction - the View element appearing on top of the player's view during ad playback.
    • removeAll

      void removeAll()
      Used to remove all elements marked as friendly advertising obstructions.

      Note: This will take effect in the next ad session.

    • getList

      @Deprecated List<View> getList()
      Deprecated.
      Deprecated. Use getFriendlyAdObstructions() instead.

      Used to retrieve all View elements registered as friendly advertising obstructions.

      Returns:
      the list of View elements registered as friendly advertising obstructions.
    • getFriendlyAdObstructions

      List<FriendlyAdObstruction> getFriendlyAdObstructions()
      Deprecated. Use getFriendlyAdObstructions() instead.

      Used to retrieve all FriendlyAdObstruction elements marked as friendly advertising obstructions.

      Returns:
      the list of FriendlyAdObstruction elements marked as friendly advertising obstructions.