VideoSize

Added in 1.1.0
Deprecated in 1.3.0

public class VideoSize implements VersionedParcelable

VideoSize

This class is deprecated.

androidx.media2 is deprecated.


Immutable class for describing video size.

Summary

Public constructors

VideoSize(@IntRange(from = 0) int width, @IntRange(from = 0) int height)

Creates a new immutable VideoSize instance.

Public methods

boolean

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
@NonNull 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
public VideoSize(@IntRange(from = 0) int width, @IntRange(from = 0) int height)

Creates a new immutable VideoSize instance.

Parameters
@IntRange(from = 0) int width

The width of the video

@IntRange(from = 0) int height

The height of the video

Public methods

equals

public boolean equals(@Nullable Object obj)

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
public @IntRange(from = 0) int getHeight()

Returns the height of the video.

getWidth

Added in 1.1.0
Deprecated in 1.3.0
public @IntRange(from = 0) int getWidth()

Returns the width of the video.

hashCode

public int hashCode()

toString

public @NonNull String toString()

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

Returns
@NonNull String

string representation of the video size