The voice message body.
VoiceMessageBody(File voiceFile, int duration)
Definition VoiceMessageBody.java:42
◆ VoiceMessageBody() [1/2]
io.agora.chat.VoiceMessageBody.VoiceMessageBody |
( |
File | voiceFile, |
|
|
int | duration ) |
Creates a voice message body.
- Parameters
-
voiceFile | The path of the voice file. |
duration | The voice duration in seconds. |
◆ VoiceMessageBody() [2/2]
io.agora.chat.VoiceMessageBody.VoiceMessageBody |
( |
Uri | voiceFile, |
|
|
int | duration ) |
Creates a voice message body.
- Parameters
-
voiceFile | The URI of the voice file. |
duration | The voice duration in seconds. |
◆ getFileSize()
long io.agora.chat.VoiceMessageBody.getFileSize |
( |
| ) |
|
Gets the size of the voice file.
- Returns
- The size of the voice file in bytes.
◆ getLength()
int io.agora.chat.VoiceMessageBody.getLength |
( |
| ) |
|
Gets the voice duration.
- Returns
- The voice duration in seconds.
The documentation for this class was generated from the following file:
- io/agora/chat/VoiceMessageBody.java