Skip to main content

createVideoMessageByURL

Feature Introduction

Description

When you need to store resources yourself, create a video message to send to the other party after uploading the video and thumbnail via the API and obtaining the download address.

Note

Messages created using this API must be sent through sendMessageNotOss.

Function Prototype


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

Input Parameters

Parameter NameData TypeMandatoryDescription
fileURLNSStringYesVideo address
videoTypeNSStringNoVideo type
durationNSIntegerYesDuration
sizeNSIntegerYesDuration
snapshotPathNSStringNoVideo thumbnail address

Return Result

NameData TypeDescription
messageOIMMessageInfoSuccessful return

Code Example


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