The voice message body.
EMVoiceMessageBody(File voiceFile, int duration)
Definition: EMVoiceMessageBody.java:55
◆ EMVoiceMessageBody() [1/2]
com.hyphenate.chat.EMVoiceMessageBody.EMVoiceMessageBody |
( |
File |
voiceFile, |
|
|
int |
duration |
|
) |
| |
Creates a voice message body.
- Parameters
-
voiceFile | The path of the voice file. |
duration | The voice duration in seconds. |
◆ EMVoiceMessageBody() [2/2]
com.hyphenate.chat.EMVoiceMessageBody.EMVoiceMessageBody |
( |
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 com.hyphenate.chat.EMVoiceMessageBody.getFileSize |
( |
| ) |
|
Gets the size of the voice file.
- Returns
- The size of the voice file in bytes.
◆ getLength()
int com.hyphenate.chat.EMVoiceMessageBody.getLength |
( |
| ) |
|
Gets the voice duration.
- Returns
- The voice duration in seconds.
The documentation for this class was generated from the following file:
- com/hyphenate/chat/EMVoiceMessageBody.java