PLVDocumentUploadClient
Objective-C
@interface PLVDocumentUploadClient : NSObject
Swift
class PLVDocumentUploadClient : NSObject
文档上传管理器
-
上传过程错误情况回调
Declaration
Objective-C
@property (nonatomic, weak) id<PLVDocumentUploadErrorDelegate> _Nullable errorDelegate;Swift
weak var errorDelegate: PLVDocumentUploadErrorDelegate? { get set } -
上传结果回调,用于刷新页面,回调方法在主线程执行
Declaration
Objective-C
@property (nonatomic, weak) id<PLVDocumentUploadResultDelegate> _Nullable resultDelegate;Swift
weak var resultDelegate: PLVDocumentUploadResultDelegate? { get set } -
用户是否【支持动效转码】
Declaration
Objective-C
@property (nonatomic, readonly) BOOL pptAnimationEnabled;Swift
var pptAnimationEnabled: Bool { get } -
上传任务队列(包含上传中、上传失败)
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSMutableArray<PLVDocumentUploadModel *> *_Nonnull uploadArray;Swift
@NSCopying var uploadArray: NSMutableArray { get } -
上传中任务队列
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSMutableArray<PLVDocumentUploadModel *> *_Nonnull uploadingArray;Swift
@NSCopying var uploadingArray: NSMutableArray { get }
-
Undocumented
Declaration
Objective-C
+ (instancetype)sharedClient;Swift
class func shared() -> Self -
初始化上传管理器,登录时调用
Note
用于 手机开播(三分屏)场景Declaration
Objective-C
- (void)setupWithChannelId:(nonnull NSString *)channelId pptAnimationEnable:(BOOL)pptAnimationEnabled;Swift
func setup(withChannelId channelId: String, pptAnimationEnable pptAnimationEnabled: Bool)Parameters
channelId登录频道号
pptAnimationEnabled是否支持动效转码
-
初始化上传管理器,登录时调用
Note
用于 互动学堂场景Declaration
Objective-C
- (void)setupWithChannelId:(nonnull NSString *)channelId lessionId:(nonnull NSString *)lessionId pptAnimationEnable:(BOOL)pptAnimationEnabled;Swift
func setup(withChannelId channelId: String, lessionId: String, pptAnimationEnable pptAnimationEnabled: Bool)Parameters
channelId登录频道号
lessionId课节Id
pptAnimationEnabled是否支持动效转码
-
初始化上传管理器,登录时调用
Note
用于 互动学堂场景Declaration
Objective-C
- (void)setupWithChannelId:(nonnull NSString *)channelId lessionId:(nonnull NSString *)lessionId courseCode:(NSString *_Nullable)courseCode pptAnimationEnable:(BOOL)pptAnimationEnabled teacher:(BOOL)teacher;Swift
func setup(withChannelId channelId: String, lessionId: String, courseCode: String?, pptAnimationEnable pptAnimationEnabled: Bool, teacher: Bool)Parameters
channelId登录频道号
lessionId课节Id
courseCode课程号
pptAnimationEnabled是否支持动效转码
teacher是否为讲师
-
新增文档上传
Declaration
Objective-C
- (void)uploadDocumentWithFileURL:(nonnull NSURL *)fileURL convertType:(nonnull NSString *)convertType;Swift
func uploadDocument(withFileURL fileURL: URL, convertType: String)Parameters
fileURL待上传文档 URL
convertType转码类型
-
移除上传任务
Declaration
Objective-C
- (void)removeUploadWithFileId:(nonnull NSString *)fileId;Swift
func removeUpload(withFileId fileId: String)Parameters
fileId上传任务的 fileId
-
删除沙盒文档
Declaration
Objective-C
- (void)deleteFileWithFileName:(nonnull NSString *)fileName;Swift
func deleteFile(withFileName fileName: String)Parameters
fileName文件名称
-
中断之后,恢复所有上传中任务
Declaration
Objective-C
- (void)continueAllUpload;Swift
func continueAllUpload() -
中断之后,移除所有上传中任务
Declaration
Objective-C
- (void)clearAllUpload;Swift
func clearAllUpload() -
停止所有上传任务
Declaration
Objective-C
- (void)stopAllUpload;Swift
func stopAllUpload()
-
失败重试
Note
用于 手机开播(三分屏)场景Declaration
Objective-C
- (void)retryUploadWithFileId:(nonnull NSString *)fileId;Swift
func retryUpload(withFileId fileId: String)Parameters
fileId失败任务的 fileId
-
失败重试
Note
用于 互动学堂 场景 (支持重启APP后重试)Declaration
Objective-C
- (void)retryUploadWithModel:(nonnull PLVDocumentUploadModel *)model;Swift
func retryUpload(with model: PLVDocumentUploadModel)Parameters
model文档模型
-
重新上传 转码失败文档
Note
用于 互动学堂 场景(支持重启APP后重试)Declaration
Objective-C
- (void)retryUploadConvertFailureDocumentWithModel: (nonnull PLVDocumentUploadModel *)model;Swift
func retryUploadConvertFailureDocument(with model: PLVDocumentUploadModel)Parameters
model文档模型
View on GitHub
PLVDocumentUploadClient Class Reference