class VideoSize : Bundleable


Represents the video size.

Summary

Constants

const Bundleable.Creator<VideoSize!>!

This property is deprecated.

Use fromBundle instead.

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,
    unappliedRotationDegrees: @IntRange(from = 0, to = 359) Int,
    pixelWidthHeightRatio: @FloatRange(from = 0, fromInclusive = false) Float
)

Creates a new instance.

Public functions

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

Restores a VideoSize from a Bundle.

Int
Bundle!

Returns a Bundle representing the information stored in this object.

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

Clockwise rotation in degrees that the application should apply for the video for it to be rendered in the correct orientation.

@IntRange(from = 0) Int

The video width in pixels, 0 when unknown.

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<VideoSize!>!

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,
    unappliedRotationDegrees: @IntRange(from = 0, to = 359) 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.

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

Clockwise rotation in degrees that the application should apply for the video for it to be rendered in the correct orientation. See unappliedRotationDegrees.

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.

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!

Returns a Bundle representing the information stored in this object.

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

Clockwise rotation in degrees that the application should apply for the video for it to be rendered in the correct orientation.

Is 0 if unknown or if no rotation is needed.

Player should apply video rotation internally, in which case unappliedRotationDegrees is 0. But when a player can't apply the rotation, for example before API level 21, the unapplied rotation is reported by this field for application to handle.

Applications that use android.view.TextureView can apply the rotation by calling setTransform.

width

val width: @IntRange(from = 0) Int

The video width in pixels, 0 when unknown.