- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Voice message (VoiceMessage) is a built-in SDK message type. Its contentType value is jg:voice.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | String | Local voice-audio path. | 1.0.0 |
| url | String | Remote voice-audio URL. | 1.0.0 |
| duration | int | Voice-audio duration in seconds. | 1.0.0 |
| extra | String | Extension fields. | 1.0.0 |
Voice message (JVoiceMessage) is a built-in SDK message type. Its contentType value is jg:voice.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | NSString | Local voice-audio path. | 1.0.0 |
| url | NSString | Remote voice-audio URL. | 1.0.0 |
| duration | long | Voice-audio duration in seconds. | 1.0.0 |
| extra | NSString | Extension fields. | 1.0.0 |
Voice messages are built-in SDK message types. The corresponding enum is MessageType.VOICE
| Property | Type | Description | Version |
|---|---|---|---|
| url | String | Voice-message audio URL. The storage location depends on the file storage location configured when sending the audio. | 1.0.0 |
| type | String | Voice-message audio format. The default is AAC; it can be changed when sending the voice message. AAC is recommended for its high quality and small size. | 1.0.0 |
| duration | Number | Voice-audio 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 voiceMsg = {
url: 'https://example.com/xxas.aac',
type: 'aac',
duration: 40,
extra: '{"Priority":"P0"}'
}
let message = {
conversationType: ConversationType.PRIVATE,
conversationId: 'userId1',
name: MessageType.VOICE,
content: voiceMsg
};
Voice message (VoiceMessage) is a built-in SDK message type. Its contentType value is jg:voice.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | String | Local voice-audio path. | 0.6.3 |
| url | String | Remote voice-audio URL. | 0.6.3 |
| duration | int | Voice-audio duration in seconds. | 0.6.3 |
| extra | String | Extension fields. | 0.6.3 |
Voice message (VoiceMessageContent) is a built-in SDK message type. Its contentType value is jg:voice.
| Property | Type | Description | Version |
|---|---|---|---|
| localPath | string | Local voice-audio path. | 1.0.0 |
| url | string | Remote voice-audio URL. | 1.0.0 |
| duration | number | Voice-audio duration in seconds. | 1.0.0 |
| extra | string | Extension fields. | 1.0.0 |
Voice message (VoiceMessage) is a built-in SDK message type. Its contentType value is jg:voice.
| Property | Type | Description | Version |
|---|---|---|---|
| url | string | Remote voice-audio URL. | 1.0.0 |
| duration | number | Voice-audio duration in seconds. | 1.0.0 |
| extra | string | Extension fields. | 1.0.0 |