BDMaterialUploaderClient class

Inheritance

Constructors

BDMaterialUploaderClient.new([NativeClassOptions? options])

Properties

$resource → NativeResource
no setterinherited
delegate FutureOr<BDVideoUploadClientDelegate?>
{zh} @brief 实现上传回调的 delegate,详见 BDVideoUploadClientDelegate{@link #BDVideoUploadClientDelegate}。
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
ready Future<void>
Whether the instance is initialized
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshot FutureOr<CGFloat?>
{zh} @brief 设置视频自动抽帧时间点,单位为秒。
getter/setter pairinherited

Methods

close() FutureOr<void>
{zh} @brief 结束上传,并销毁上传实例(不可恢复)。 @notes 当不需要再次进行上传操作时,务必调用该函数进行上传实例的销毁,否则会导致内存泄露。
override
destroy() → void
inherited
initWithFilePath(NSString filePath) FutureOr<BDMaterialUploaderClient>
{zh} @brief 初始化上传实例。 @param filePath 需要上传的视频的路径。 @return 上传实例。
override
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta]) Future<T>
Call instance method
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendInstanceGet<T>(String property) Future<T>
Get instance property
inherited
sendInstanceSet(String property, dynamic value) Future<void>
Set instance property
inherited
setAuthorizationParameter(NSDictionary parameter) FutureOr<void>
{zh} @brief 设置鉴权。 @param parameter 鉴权参数。 @brief 鉴权参数包括:
BDFileUploadAccessKey : accessKey
BDFileUploadSecretKey : secretKey
BDFileUploadSessionToken : sessionToken
BDFileUploadSpace : spaceName
override
setCategory(NSString category) FutureOr<void>
{zh} @brief 设置素材的文件分类。 @param category 需要设置素材的文件类型。 @notes "media" 包括 "video" 和 "audio","image" 包括 "image" 和 "dynamic\_img","object" 包括 "subtitle" 和 "font"。
setClassificationId(NSInteger classificationId) FutureOr<void>
{zh} @brief 设置分类 ID,从而对视频进行分类。 @param classificationId 需要设置的分类 ID。 @notes 素材不支持分类。
override
setCustomHttpHeaders(NSDictionary parameter) FutureOr<void>
{zh} @brief 设置自定义 http header。 @param parameter 需要设置的 header。
override
setDescription(NSString description) FutureOr<void>
{zh} @brief 设置上传素材的描述信息。 @param description 需要设置的素材的描述信息。 @notes 素材上传时独有参数。
override
setFileExtension(NSString fileExtension) FutureOr<void>
{zh} @brief 设置文件路径后缀。 @param fileExtension 需要设置的文件路径后缀。 @notes 后缀需要以 '.' 开头,比如 ".mp4"。
override
setFileName(NSString fileName) FutureOr<void>
override
setFilePrefix(NSString filePrefix) FutureOr<void>
{zh} @brief 设置文件路径前缀。 @param filePrefix 需要设置的文件路径前缀。 @notes 前缀需要以 '/' 结尾。
override
setFileType(NSString fileType) FutureOr<void>
{zh} @brief 设置素材的文件类型,包括 "media","image","object"。 @param fileType 需要设置素材的文件类型。
setFlushUploadMode(BDUploadFlushUploadMode mode) FutureOr<void>
{zh} @brief 设置覆盖上传模式。 @param mode BDUploadFlushUploadMode 枚举值,详见 BDUploadFlushUploadMode{@link #BDUploadFlushUploadMode}。
override
setFormat(NSString format) FutureOr<void>
{zh} @brief 设置上传素材的格式。 @param format 需要设置的素材的格式。 @notes 素材上传时独有参数;多个标签可用逗号隔开。
override
setGetMetaMode(BDVideoUploadGetMetaMode mode) FutureOr<void>
{zh} @brief 设置抽取 meta 的模式。 @param mode 需要设置模式,详见 BDVideoUploadGetMetaMode{@link #BDVideoUploadGetMetaMode}。
override
setOptionInfo(NSDictionary optionInfo) FutureOr<void>
{zh} @brief 设置上传额外参数。 @param optionInfo 需要设置的 kv 形式的额外参数。 @notes 传入的所有键值对会被透传到服务端。
override
setRequestParameter(NSDictionary parameter) FutureOr<void>
{zh} @brief 设置自定义请求参数。 @param parameter 需要设置的请求参数。 @notes 参数说明:
key type Describe
BDFileUploadFileType NSString 上传文件类型,比如 "media"
BDFileUploadTraceId NSString 上传跟踪标识,可将该次上传于业务行为进行关联
BDFileUploadCustomedParameter NSString 需要携带的自定义参数
override
setTags(NSString tags) FutureOr<void>
{zh} @brief 设置上传素材的标签。 @param tags 需要设置的素材的标签。 @notes 素材上传时独有参数;多个标签可用逗号隔开。
override
setTemplateId(NSString templateId) FutureOr<void>
{zh} @brief 设置工作流 ID。 @param templateId 需要设置的工作流 ID。
override
setTitle(NSString title) FutureOr<void>
{zh} @brief 设置上传素材的标题。 @param title 需要设置的素材的标题。 @notes 素材上传时独有参数。
override
setUploadConfig(NSDictionary config) FutureOr<void>
{zh} @brief 设置上传的配置策略。 @param config 需要配置的上传策略。 @notes
键值 类型 描述 是否必须
BDFileUploadSliceRetryCount NSNumber(NSInteger) 分片失败重试次数 NO
BDFileUploadFileRetryCount NSNumber(NSInteger) 文件失败重试次数 NO
BDFileUploadTranTimeOutUnit NSNumber(NSInteger) socket 单次读写超时时间 NO
BDFileUploadSliceSize NSNumber(NSInteger) 分片的大小 NO
BDFileUploadSocketNum NSNumber(NSInteger) 并行分片上传线程数 NO
BDFileUploadMaxFailTimes NSNumber(NSInteger) 最大建联失败时间 NO
BDFileUploadAliveMaxFailTime NSNumber(NSInteger) 复用连接情况下最大超时时间 NO
BDFileUploadTcpOpenTimeOutMilliSec NSNumber(NSInteger) tcp 建联超时时间 NO
BDFileUploadRWTimeout NSNumber(NSInteger) socket 读写超时时间 NO
BDFileUploadHttpsEnable NSNumber(BOOL) 是否开启 https NO
BDFileUploadDiskResumeOption NSNumber(NSInteger) 是否开启断点续传功能 NO
override
setVideoHostName(NSString hostName) FutureOr<void>
{zh} @brief 设置 apply 阶段的 host。 @param hostName 需要设置的 host。
override
setVideoRegionName(NSString regionName) FutureOr<void>
{zh} @brief 设置点播视频上传实例的 region。 @param regionName 需要设置的 region。
override
setVideoSceneTag(NSString sceneTag) FutureOr<void>
{zh} @brief 设置场景 tag。 @param sceneTag 需要设置的场景 tag。
override
start() FutureOr<void>
{zh} @brief 开始上传。
override
stop() FutureOr<void>
{zh} @brief 暂停上传。
override
toString() String
A string representation of this object.
inherited
updateResource(NativeResource resource) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited