ICVideoAttachment

Represents an attachment that contains video data.

fromJSON

Instantiates an ICVideoAttachment from a JSONObject. The JSONObject must contain valid video attachment data.

  Syntax: static ICVideoAttachment fromJSON(JSONObject jsonObj)

  Return Value: A new ICVideoAttachment instance, or null if jsonObj is null.

  Parameters:

Parameter

Type

Description

jsonObj

JSONObject

A JSONObject instance containing valid video attachment data.

getDuration

Gets the duration of the video attachment, in seconds.

  Syntax: long getDuration()

  Return Value: The duration of the video attachment, in seconds.

getPreviewImage

Gets the video attachment preview image as a bitmap.

  Syntax: Bitmap getPreviewImage()

  Return Value: The video attachment preview image as a bitmap, or null if no preview exists.

setDuration

Sets the duration of the video attachment, in seconds.

  Syntax: void setDuration(long duration)

  Parameters:

Parameter

Type

Description

duration

int

Specifies the duration, in seconds.

setPreviewImage

Sets the preview image of the video attachment.

  Syntax: void setPreviewImage(Bitmap preview)

  Parameters:

Parameter

Type

Description

preview

Bitmap

Specifies the preview image for the video attachment.