1 package com.netease.nimlib.sdk.msg.attachment;
6 import org.json.JSONObject;
13 private long duration;
14 private boolean autoTransform;
37 this.duration = duration;
47 this.autoTransform = autoTransform;
60 return NimStorageType.TYPE_AUDIO;
64 protected void save(JSONObject json) {
65 JSONHelper.put(json, KEY_DURATION, duration);
69 protected void load(JSONObject json) {
70 duration = JSONHelper.getInt(json, KEY_DURATION);
void save(JSONObject json)
void setAutoTransform(boolean autoTransform)
AudioAttachment(String attach)
static final String KEY_DURATION
long getDuration()
获取音频的播放时长
void setDuration(long duration)
设置音频的播放时长
boolean getAutoTransform()
void setText(String text)
void load(JSONObject json)
NimStorageType storageType()