class VideoSize


Represents the video size.

Summary

Constants

const VideoSize!

Public constructors

@UnstableApi
VideoSize(width: @IntRange(from = 0) Int, height: @IntRange(from = 0) Int)

Creates a VideoSize without unapplied rotation or anamorphic content.

@UnstableApi
VideoSize(
    width: @IntRange(from = 0) Int,
    height: @IntRange(from = 0) Int,
    pixelWidthHeightRatio: @FloatRange(from = 0, fromInclusive = false) Float
)

Creates a new instance.

@UnstableApi
VideoSize(
    width: @IntRange(from = 0) Int,
    height: @IntRange(from = 0) Int,
    unappliedRotationDegrees: @IntRange(from = 0, to = 359) Int,
    pixelWidthHeightRatio: @FloatRange(from = 0, fromInclusive = false) Float
)

This function is deprecated.

Use VideoSize instead.

Public functions

Boolean
equals(obj: Any?)
java-static VideoSize!

Restores a VideoSize from a Bundle.

Int
Bundle!

Public properties

@IntRange(from = 0) Int

The video height in pixels, 0 when unknown.

@FloatRange(from = 0, fromInclusive = false) Float

The width to height ratio of each pixel, 1 if unknown.

@IntRange(from = 0, to = 359) Int

This property is deprecated.

Rotation is handled internally by the player, so this is always zero.

@IntRange(from = 0) Int

The video width in pixels, 0 when unknown.

Constants

UNKNOWN

const val UNKNOWNVideoSize!

Public constructors

VideoSize

@UnstableApi
VideoSize(width: @IntRange(from = 0) Int, height: @IntRange(from = 0) Int)

Creates a VideoSize without unapplied rotation or anamorphic content.

Parameters
width: @IntRange(from = 0) Int

The video width in pixels.

height: @IntRange(from = 0) Int

The video height in pixels.

VideoSize

@UnstableApi
VideoSize(
    width: @IntRange(from = 0) Int,
    height: @IntRange(from = 0) Int,
    pixelWidthHeightRatio: @FloatRange(from = 0, fromInclusive = false) Float
)

Creates a new instance.

Parameters
width: @IntRange(from = 0) Int

The video width in pixels.

height: @IntRange(from = 0) Int

The video height in pixels.

pixelWidthHeightRatio: @FloatRange(from = 0, fromInclusive = false) Float

The width to height ratio of each pixel. For the normal case of square pixels this will be equal to 1.0. Different values are indicative of anamorphic content.

VideoSize

@UnstableApi
VideoSize(
    width: @IntRange(from = 0) Int,
    height: @IntRange(from = 0) Int,
    unappliedRotationDegrees: @IntRange(from = 0, to = 359) Int,
    pixelWidthHeightRatio: @FloatRange(from = 0, fromInclusive = false) Float
)

Public functions

equals

fun equals(obj: Any?): Boolean

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): VideoSize!

Restores a VideoSize from a Bundle.

hashCode

fun hashCode(): Int

toBundle

@UnstableApi
fun toBundle(): Bundle!

Public properties

height

val height: @IntRange(from = 0) Int

The video height in pixels, 0 when unknown.

pixelWidthHeightRatio

val pixelWidthHeightRatio: @FloatRange(from = 0, fromInclusive = false) Float

The width to height ratio of each pixel, 1 if unknown.

For the normal case of square pixels this will be equal to 1.0. Different values are indicative of anamorphic content.

unappliedRotationDegrees

val unappliedRotationDegrees: @IntRange(from = 0, to = 359) Int

width

val width: @IntRange(from = 0) Int

The video width in pixels, 0 when unknown.