Skip to main content

createSoundMessageByURL

Description

info

When you need to store resources yourself, upload the audio via API and obtain the download URL, then create an audio message.

Note

Messages created through this API must be sent via sendMessageNotOss.

Function Prototype


+ (OIMMessageInfo *)createSoundMessageByURL:(NSString *)fileURL
duration:(NSInteger)duration
size:(NSInteger)size;

Input Parameters

Parameter NameParameter TypeRequiredDescription
fileURLNSStringYesAudio URL
durationNSIntegerYesDuration
sizeNSIntegerYesFile size

Return Result

NameTypeDescription
messageOIMMessageInfoSuccess return

Code Example


OIMMessageInfo *message = [OIMMessageInfo createSoundMessageByURL:@"" duration:1 size:1024];