IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMVideoElem

Public Member Functions

String getVideoPath ()
 
String getVideoUUID ()
 
int getVideoSize ()
 
int getDuration ()
 
void downloadVideo (final String path, final V2TIMDownloadCallback v2TIMDownloadCallback)
 
void getVideoUrl (final V2TIMValueCallback< String > callback)
 
String getSnapshotPath ()
 
String getSnapshotUUID ()
 
int getSnapshotSize ()
 
int getSnapshotWidth ()
 
int getSnapshotHeight ()
 
void downloadSnapshot (final String path, final V2TIMDownloadCallback v2TIMDownloadCallback)
 
void getSnapshotUrl (final V2TIMValueCallback< String > callback)
 
String toString ()
 
V2TIMElem getNextElem ()
 
void appendElem (V2TIMElem v2TIMElem)
 

Member Function Documentation

◆ getVideoPath()

String getVideoPath ( )
inline

Get the video file path (can only be called by the message sender)

Returns
Path of the video file

◆ getVideoUUID()

String getVideoUUID ( )
inline

Get the internal video ID, which can be used as the key for external caching

Returns
Video file ID

◆ getVideoSize()

int getVideoSize ( )
inline

Get the video size

Returns
Video file size

◆ getDuration()

int getDuration ( )
inline

Get the video duration, in seconds

Returns
Duration, in seconds

◆ downloadVideo()

void downloadVideo ( final String  path,
final V2TIMDownloadCallback  v2TIMDownloadCallback 
)
inline

Download a video. This API downloads data from the server. To cache or store the data, you can use the UUID as the key. The Chat SDK does not store the files.

Parameters
pathThe path to which the video file is saved. It must be specified externally.
v2TIMDownloadCallbackCallback

◆ getVideoUrl()

void getVideoUrl ( final V2TIMValueCallback< String >  callback)
inline

Get the video download URL

◆ getSnapshotPath()

String getSnapshotPath ( )
inline

Get the path of the screenshot file (can only be called by the message sender)

Returns
The path of the screenshot file specified when it is sent

◆ getSnapshotUUID()

String getSnapshotUUID ( )
inline

Get the internal screenshot ID, which can be used as the key for external caching

Returns
Screenshot ID

◆ getSnapshotSize()

int getSnapshotSize ( )
inline

Get the screenshot size

Returns
Screenshot size

◆ getSnapshotWidth()

int getSnapshotWidth ( )
inline

Get the screenshot width

Returns
Width

◆ getSnapshotHeight()

int getSnapshotHeight ( )
inline

Get the screenshot height

Returns
Height

◆ downloadSnapshot()

void downloadSnapshot ( final String  path,
final V2TIMDownloadCallback  v2TIMDownloadCallback 
)
inline

Download a video screenshot. This API downloads data from the server. To cache or store the data, you can use the UUID as the key. The Chat SDK does not store the files.

Parameters
pathThe path to which the screenshot file is saved. It must be specified externally.
v2TIMDownloadCallbackCallback

◆ getSnapshotUrl()

void getSnapshotUrl ( final V2TIMValueCallback< String >  callback)
inline

Get the screenshot download URL

◆ toString()

String toString ( )
inline

◆ getNextElem()

V2TIMElem getNextElem ( )
inlineinherited

◆ appendElem()

void appendElem ( V2TIMElem  v2TIMElem)
inlineinherited

Add the next element

To configure multiple elements, after creating a Message object, you can add the next element via the element object of Message.

The following is the sample code for creating V2TIMTextElem and V2TIMCustomElem:

V2TIMMessage message = V2TIMManager.getMessageManager().createTextMessage("test");

V2TIMCustomElem customElem = new V2TIMCustomElem();

customElem.setData("Custom message".getBytes());

message.getTextElem().appendElem(customElem);

Attention
  • This API can be called only by elements of a Message object created via createMessage.
  • This API can be used to add V2TIMTextElem, V2TIMCustomElem, V2TIMFaceElem, or V2TIMLocationElem.