- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Video message (VideoMessage) is a built-in SDK message type. Its contentType value is jg:video.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | String | Local video path. | 1.0.0 |
| url | String | Remote video URL. | 1.0.0 |
| snapshotLocalPath | String | Local video-cover path. | 1.0.0 |
| snapshotUrl | String | Remote video-cover URL. | 1.0.0 |
| height | int | Video height. | 1.0.0 |
| width | int | Video width. | 1.0.0 |
| size | long | Video size in Byte. | 1.0.0 |
| duration | int | Video duration in seconds. | 1.0.0 |
| extra | String | Extension fields. | 1.0.0 |
Video message (JVideoMessage) is a built-in SDK message type. Its contentType value is jg:video.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | NSString | Local video path. | 1.0.0 |
| url | NSString | Remote video URL. | 1.0.0 |
| snapshotLocalPath | NSString | Local video-cover path. | 1.0.0 |
| snapshotUrl | NSString | Remote video-cover URL. | 1.0.0 |
| height | int | Video height. | 1.0.0 |
| width | int | Video width. | 1.0.0 |
| size | long long | Video size in Byte. | 1.0.0 |
| duration | int | Video duration in seconds. | 1.0.0 |
| extra | NSString | Extension fields. | 1.0.0 |
Video messages are built-in SDK message types. The corresponding enum is MessageType.VIDEO
| Property | Type | Description | Version |
|---|---|---|---|
| url | String | Video file URL | 1.0.0 |
| snapshotUrl | String | Video cover image. The SDK automatically captures the first video frame. | 1.0.0 |
| height | Number | Video height. | 1.0.0 |
| width | Number | Video width. | 1.0.0 |
| size | Number | Video size, used to display progress when viewing or downloading, in KB | 1.0.0 |
| duration | Number | Video duration, in seconds | 1.0.0 |
| extra | String | Additional message content. JSON strings are supported and cannot be changed after setting. | 1.0.0 |
let videoMsg = {
snapshotUrl: "https://example.com/snapshot.png",
url: "https://example.com/demo.mp4",
height: 500,
width: 800,
size: 2000,
duration: 48,
extra: '{"Priority":"P0"}'
}
let message = {
conversationType: ConversationType.PRIVATE,
conversationId: 'userId1',
name: MessageType.VIDEO,
content: videoMsg
};
Video message (VideoMessage) is a built-in SDK message type. Its contentType value is jg:video.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | String | Local video path. | 0.6.3 |
| url | String | Remote video URL. | 0.6.3 |
| snapshotLocalPath | String | Local video-cover path. | 0.6.3 |
| snapshotUrl | String | Remote video-cover URL. | 0.6.3 |
| height | int | Video height. | 0.6.3 |
| width | int | Video width. | 0.6.3 |
| size | int | Video size in Byte. | 0.6.3 |
| duration | int | Video duration in seconds. | 0.6.3 |
| extra | String | Extension fields. | 0.6.3 |
Video message (VideoMessageContent) is a built-in SDK message type. Its contentType value is jg:video.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | string | Local video path. | 1.0.0 |
| url | string | Remote video URL. | 1.0.0 |
| snapshotLocalPath | string | Local video-cover path. | 1.0.0 |
| snapshotUrl | string | Remote video-cover URL. | 1.0.0 |
| height | number | Video height. | 1.0.0 |
| width | number | Video width. | 1.0.0 |
| size | number | Video size in Byte. | 1.0.0 |
| duration | number | Video duration in seconds. | 1.0.0 |
| extra | string | Extension fields. | 1.0.0 |
Video message (VideoMessage) is a built-in SDK message type. Its contentType value is jg:video.
| Property | Type | Description | Version |
|---|---|---|---|
| url | string | Remote video URL. | 1.0.0 |
| snapshotUrl | string | Remote video-cover URL. | 1.0.0 |
| height | number | Video height. | 1.0.0 |
| width | number | Video width. | 1.0.0 |
| size | number | Video size in KB. | 1.0.0 |
| duration | number | Video duration in seconds. | 1.0.0 |
| extra | string | Extension fields. | 1.0.0 |