VideoSize

Added in 1.1.0
Deprecated in 1.3.0

class VideoSize : VersionedParcelable

Known direct subclasses
VideoSize

This class is deprecated.

androidx.media2 is deprecated.


Immutable class for describing video size.

Summary

Public constructors

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

Creates a new immutable VideoSize instance.

Public functions

Boolean
equals(obj: Any?)

Checks if this video size is equal to another video size.

@IntRange(from = 0) Int

Returns the height of the video.

@IntRange(from = 0) Int

Returns the width of the video.

Int
String

Return the video size represented as a string with the format "WxH"

Public constructors

VideoSize

Added in 1.1.0
Deprecated in 1.3.0
VideoSize(width: @IntRange(from = 0) Int, height: @IntRange(from = 0) Int)

Creates a new immutable VideoSize instance.

Parameters
width: @IntRange(from = 0) Int

The width of the video

height: @IntRange(from = 0) Int

The height of the video

Public functions

equals

fun equals(obj: Any?): Boolean

Checks if this video size is equal to another video size.

Two video sizes are equal if and only if both their widths and heights are equal.

A video size object is never equal to any other type of object.

Returns
Boolean

true if the objects were equal, false otherwise

getHeight

Added in 1.1.0
Deprecated in 1.3.0
fun getHeight(): @IntRange(from = 0) Int

Returns the height of the video.

getWidth

Added in 1.1.0
Deprecated in 1.3.0
fun getWidth(): @IntRange(from = 0) Int

Returns the width of the video.

hashCode

fun hashCode(): Int

toString

fun toString(): String

Return the video size represented as a string with the format "WxH"

Returns
String

string representation of the video size