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 (valid only for the message sender)

Returns
Local file path

◆ getVideoUUID()

String getVideoUUID ( )
inline

Get the video ID, which is an internal ID and can be used as an external cache key

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 The downloadVideo API downloads videos from the server each time. If cache or storage is required, you can use UUIDs as keys for external storage. The IM SDK does not store resource files.

Parameters
pathVideo save path, which must be specified externally
v2TIMDownloadCallbackCallback

◆ getVideoUrl()

void getVideoUrl ( final V2TIMValueCallback< String >  callback)
inline

Get the video download URL

◆ getSnapshotPath()

String getSnapshotPath ( )
inline

Get the screenshot file path (valid only for the message sender)

Returns
Screenshot path sent during sending

◆ getSnapshotUUID()

String getSnapshotUUID ( )
inline

Get the screenshot ID, which is an internal ID and can be used as an external cache key

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 The downloadSnapshot API downloads screenshots from the server each time. If cache or storage is required, you can use UUIDs as keys for external storage. The IM SDK does not store resource files.

Parameters
pathScreenshot save path, which 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, you can add the next element via the element of a Message object after creating the Message object.

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

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 elements only of the V2TIMTextElem, V2TIMCustomElem, V2TIMFaceElem, and V2TIMLocationElem types.