HlsMediaPlaylist.ClientDefinedAttribute


class HlsMediaPlaylist.ClientDefinedAttribute


A client defined attribute. See RFC 8216bis, section 4.4.5.1.

Summary

Nested types

The type of the client defined attribute.

Constants

const Int

Type double.

const Int

Type hex text.

const Int

Type text.

Public constructors

Creates an instance of type TYPE_DOUBLE.

ClientDefinedAttribute(
    name: String!,
    value: String!,
    @HlsMediaPlaylist.ClientDefinedAttribute.Type type: Int
)

Creates an instance of type TYPE_TEXT or TYPE_HEX_TEXT.

Public functions

Boolean
equals(o: Any?)
Int

Public properties

Double

Returns the value if the attribute is of TYPE_DOUBLE.

String!

The name of the client defined attribute.

String?

Returns the text value if the attribute is of TYPE_TEXT or TYPE_HEX_TEXT.

Int

The type of the client defined attribute.

Constants

TYPE_DOUBLE

const val TYPE_DOUBLE = 2: Int

Type double. See RFC 8216bis, section 4.2, decimal-floating-point.

TYPE_HEX_TEXT

const val TYPE_HEX_TEXT = 1: Int

Type hex text. See RFC 8216bis, section 4.2, hexadecimal-sequence.

TYPE_TEXT

const val TYPE_TEXT = 0: Int

Type text. See RFC 8216bis, section 4.2, quoted-string.

Public constructors

ClientDefinedAttribute

ClientDefinedAttribute(name: String!, value: Double)

Creates an instance of type TYPE_DOUBLE.

ClientDefinedAttribute

ClientDefinedAttribute(
    name: String!,
    value: String!,
    @HlsMediaPlaylist.ClientDefinedAttribute.Type type: Int
)

Creates an instance of type TYPE_TEXT or TYPE_HEX_TEXT.

Public functions

equals

fun equals(o: Any?): Boolean

hashCode

fun hashCode(): Int

Public properties

doubleValue

val doubleValue: Double

Returns the value if the attribute is of TYPE_DOUBLE.

Throws
java.lang.IllegalStateException

if the attribute is not of type TYPE_TEXT or TYPE_HEX_TEXT.

name

val name: String!

The name of the client defined attribute.

textValue

val textValue: String?

Returns the text value if the attribute is of TYPE_TEXT or TYPE_HEX_TEXT.

Throws
java.lang.IllegalStateException

if the attribute is not of type TYPE_DOUBLE.

type

val type: Int

The type of the client defined attribute.