InAppAudioAttachment

Represents an audio attachment

Represents an audio attachment and inherits from InAppFileAttachment.

Properties

PropertiesTypeDescription
idStringThe id of the attachment.
sizeLongThe size of the attachment.
urlURLThe URL of the attachment.
durationLongThe duration of the audio is in milliseconds.
contentTypeStringThe content type of the attachment.

Functions

toJson

Converts the audio attachment to a JSONObject.

Syntax: fun toJson(): JSONObject

Return: The JSONObject converted from the audio attachment.

Companion Functions

fromJson

Converts a JSONObject to an audio attachment.

Syntax: fun fromJson(jsonObject: JSONObject): InAppThread

Return: The audio attachment converted from the JSONObject.

Parameters

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.