Interface CompanionAd

  • All Implemented Interfaces:

    
    public interface CompanionAd
    
                        

    The CompanionAd API represents a companion ad which is displayed besides the player.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String getAdSlotId() An identifier of the element in which the companion ad should be appended, if available.
      abstract String getAltText() An alternative description for ad.
      abstract String getClickThrough() The website of the advertisement.
      abstract int getHeight() The height of the companion ad.
      abstract String getResourceURI() The URI of the ad content.
      abstract int getWidth() The width of the companion ad.
      abstract String getType() The type of the companion ad.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getAdSlotId

        @NonNull() abstract String getAdSlotId()

        An identifier of the element in which the companion ad should be appended, if available.

        Default: Empty String.

        Returns:

        The identifier of the element. (NonNull)

      • getAltText

        @NonNull() abstract String getAltText()

        An alternative description for ad.

        • Only supported for StaticResource.
        Returns:

        The alternative description. (NonNull)

      • getClickThrough

        @NonNull() abstract String getClickThrough()

        The website of the advertisement.

        • Only supported for StaticResource.
        Returns:

        The url of the advertisement. (NonNull)

      • getHeight

         abstract int getHeight()

        The height of the companion ad.

        Returns:

        The height, in pixels.

      • getWidth

         abstract int getWidth()

        The width of the companion ad.

        Returns:

        The width, in pixels.

      • getType

        @NonNull() abstract String getType()

        The type of the companion ad.

        Returns:

        The type. (NonNull)