Skip to main content

createVideoMessageByURL

Description

info

When you need to store resources yourself, upload the video and thumbnail via API, obtain the download URLs, and then create a video message.

Note

Messages created through this API must be sent via sendMessageNotOss.

Function Prototype


+ (OIMMessageInfo *)createVideoMessageByURL:(NSString *)fileURL
videoType:(NSString * _Nullable)videoType
duration:(NSInteger)duration
size:(NSInteger)size
snapshot:(NSString * _Nullable)snapshotURL

Input Parameters

Parameter NameParameter TypeRequiredDescription
fileURLNSStringYesVideo URL
videoTypeNSStringNoVideo type
durationNSIntegerYesDuration
sizeNSIntegerYesFile size
snapshotPathNSStringNoVideo thumbnail URL

Return Result

NameTypeDescription
messageOIMMessageInfoSuccess return

Code Example


OIMMessageInfo *message = [OIMMessageInfo createVideoMessageByURL:@"" videoType:nil duration:1 size:1024 snapshot:nil];