ImaAdTagUriBuilder


@UnstableApi
class ImaAdTagUriBuilder


Builder for URI for IMA client side ad insertion streams.

Summary

Nested types

Types of video orientations.

Public constructors

Creates a new instance.

Public functions

Uri!

Builds a URI with the builder's current values.

ImaAdTagUriBuilder!

Sets the preferred linear orientation to be used.

Constants

IMA_ORIENTATION_LANDSCAPE

const val IMA_ORIENTATION_LANDSCAPE = 1: Int

IMA_ORIENTATION_PORTRAIT

const val IMA_ORIENTATION_PORTRAIT = 2: Int

IMA_ORIENTATION_SQUARE

const val IMA_ORIENTATION_SQUARE = 3: Int

IMA_ORIENTATION_UNSET

const val IMA_ORIENTATION_UNSET = 0: Int

Public constructors

ImaAdTagUriBuilder

ImaAdTagUriBuilder(uri: Uri!)

Creates a new instance.

Parameters
uri: Uri!

The URI.

Public functions

build

fun build(): Uri!

Builds a URI with the builder's current values. This URI can be used in the call to AdConfiguration.Builder.setAdTagUri().

Returns
Uri!

The build Uri.

Throws
java.lang.IllegalStateException

If the builder has missing or invalid inputs.

setPreferredLinearOrientation

@CanIgnoreReturnValue
fun setPreferredLinearOrientation(
    @ImaAdTagUriBuilder.ImaOrientationType preferredLinearOrientation: Int
): ImaAdTagUriBuilder!

Sets the preferred linear orientation to be used. The publisher can specify an orientation that ads should be displayed in.

Parameters
@ImaAdTagUriBuilder.ImaOrientationType preferredLinearOrientation: Int

The preferred linear orientation.

Returns
ImaAdTagUriBuilder!

This instance, for convenience.