IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMVideoElemabstract
Swift - V2TIMVideoElem
Swift

Class V2TIMVideo​Elem

public class V2TIMVideoElem : V2TIMElem  

Definition of V2TIMVideoElem

V2TIMVideoElem V2TIMVideoElem V2TIMElem V2TIMElem V2TIMVideoElem->V2TIMElem

Superclass

V2TIMElem

Definition of V2TIMElem

Initializers

init()

public override init()  

Properties

video​Path

public var videoPath: String?  

The video file path (can only be called by the message sender)

snapshot​Path

public var snapshotPath: String?  

The path of the screenshot file (can only be called by the message sender)

video​UUID

public var videoUUID: String?  

The internal video ID, which can be used as the key for external caching

video​Size

public var videoSize: Int  

Video file size

video​Type

public var videoType: String?  

Video type

duration

public var duration: Int  

Duration, in seconds

snapshot​UUID

public var snapshotUUID: String?  

The internal screenshot ID, which can be used as the key for external caching

snapshot​Size

public var snapshotSize: Int  

Screenshot file size

snapshot​Width

public var snapshotWidth: Int  

Screenshot width

snapshot​Height

public var snapshotHeight: Int  

Screenshot height

Methods

get​Video​Url(callback:​)

public func getVideoUrl(callback: @escaping (String?) -> (Void))  

Get the video download URL

get​Snapshot​Url(callback:​)

public func getSnapshotUrl(callback: @escaping (String?) -> (Void))  

Get the screenshot download URL

download​Video(path:​progress:​succ:​fail:​)

public func downloadVideo(path: String, progress: V2TIMDownLoadProgress?, succ: V2TIMSucc?, fail: V2TIMFail?)  

Download a video. This API downloads data from the server. To cache or store the data, you can use the UUID as the key. The Chat SDK does not store the files.

Parameters

path String

The path to which the video file is saved. It must be specified externally.

download​Snapshot(path:​progress:​succ:​fail:​)

public func downloadSnapshot(path: String, progress: V2TIMDownLoadProgress?, succ: V2TIMSucc?, fail: V2TIMFail?)  

Download a video screenshot. This API downloads data from the server. To cache or store the data, you can use the UUID as the key. The Chat SDK does not store the files.

Parameters

path String

The path to which the screenshot file is saved. It must be specified externally.