Instance Methods | |
(void) | - getVideoUrl: |
(void) | - getSnapshotUrl: |
(void) | - downloadVideo:progress:succ:fail: |
(void) | - downloadSnapshot:progress:succ:fail: |
(V2TIMElem *) | - nextElem |
(void) | - appendElem: |
Properties | |
NSString * | videoPath |
NSString * | snapshotPath |
NSString * | videoUUID |
int | videoSize |
NSString * | videoType |
int | duration |
NSString * | snapshotUUID |
int | snapshotSize |
int | snapshotWidth |
int | snapshotHeight |
- (void) getVideoUrl: | (void(^)(NSString *url)) | urlCallBack |
Get the video download URL.
- (void) getSnapshotUrl: | (void(^)(NSString *url)) | urlCallBack |
Get the screenshot download URL.
- (void) downloadVideo: | (NSString *) | path | |
progress: | (V2TIMDownLoadProgress) | progress | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Download a video
The downloadVideo API downloads videos from the server each time. If cache or storage is required, you can use UUIDs as keys for external storage. The IM SDK does not store resource files.
path | Video save path, which must be specified externally |
- (void) downloadSnapshot: | (NSString *) | path | |
progress: | (V2TIMDownLoadProgress) | progress | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Download a video screenshot
The downloadSnapshot API downloads screenshots from the server each time. If cache or storage is required, you can use UUIDs as keys for external storage. The IM SDK does not store resource files.
path | Screenshot save path, which must be specified externally |
- (V2TIMElem *) nextElem |
Get the next Elem. If your message has multiple Elems, you can get the next Elem object from the current Elem. If the return value is nil, it means the Elem acquisition is over. For detailed usage, please refer to the document Message sending and receiving
- (void) appendElem: | (V2TIMElem *) | elem |
Add the next element
To configure multiple elements, you can add the next element via the element of a Message object after creating the Message object. The following is the sample code for creating V2TIMTextElem and V2TIMCustomElem elements:
V2TIMMessage *msg = [[V2TIMManager sharedInstance] createTextMessage:"text"]; V2TIMCustomElem *customElem = [[V2TIMCustomElem alloc] init]; customElem.data = ["自定义消息" dataUsingEncoding:NSUTF8StringEncoding]; [msg.textElem appendElem:customElem];
|
readnonatomicstrong |
Video file path (valid only for the message sender)
|
readnonatomicstrong |
Screenshot file path (valid only for the message sender)
|
readnonatomicstrong |
Video ID which is an internal ID and can be used as an external cache key.
|
readnonatomicassign |
Video file size.
|
readnonatomicstrong |
Video type.
|
readnonatomicassign |
Duration, in seconds.
|
readnonatomicstrong |
Screenshot ID which is an internal ID and can be used as an external cache key.
|
readnonatomicassign |
Screenshot file size.
|
readnonatomicassign |
Screenshot width.
|
readnonatomicassign |
Screenshot height.