ResizablePlayer

interface ResizablePlayer


Provides an API for interactive advertisements to resize the VideoAdPlayer or VideoStreamPlayer within its container. For example, a creative may want to render a banner below the video. Implementing this interface is not mandatory, but will enable richer interactive creatives to be played in your app.

To make your player resizeable, the same class that implements VideoAdPlayer or VideoStreamPlayer must also implement ResizablePlayer.

Summary

Public functions

Unit
resize(leftMargin: Int, topMargin: Int, rightMargin: Int, bottomMargin: Int)

Resizes the VideoPlayer within its bounds by adding margins to each side, in pixels.

Unit
resize(
    leftMargin: Int,
    topMargin: Int,
    rightMargin: Int,
    bottomMargin: Int,
    transitionDurationMs: Int
)

Resizes the VideoPlayer within its bounds by adding margins to each side, in pixels.

Public functions

resize

fun resize(leftMargin: Int, topMargin: Int, rightMargin: Int, bottomMargin: Int): Unit

Resizes the VideoPlayer within its bounds by adding margins to each side, in pixels.

resize

fun resize(
    leftMargin: Int,
    topMargin: Int,
    rightMargin: Int,
    bottomMargin: Int,
    transitionDurationMs: Int
): Unit

Resizes the VideoPlayer within its bounds by adding margins to each side, in pixels.

Parameters
leftMargin: Int

left margin in pixels.

topMargin: Int

top margin in pixels.

rightMargin: Int

right margin in pixels.

bottomMargin: Int

bottom margin in pixels.

transitionDurationMs: Int

resize animation duration in milliseconds.