美文网首页
无标题文章

无标题文章

作者: wo存在 | 来源:发表于2017-08-11 10:47 被阅读10次

@interface VideoUploadObject ()@property (nonatomic,strong) TXPublishParam * param;

@end

@implementation VideoUploadObject

single_implementation(VideoUploadObject)

-(void)setInit{

if (!_param) {

_param = [[TXPublishParam alloc] init];

}

}

-(void)setSignature:(NSString *)signature

{

[self setInit];

_param.signature = signature;

[self initTheUploadVideoPath:self.dbPath coverImage:nil];

}

-(void)getTheSigNatureBlock:(theSigNature)block

{

[HXHttpTool getWithPath:[NSString stringWithFormat:@"%@%@",IP,getUploadSign_url] params:nil success:^(id JSON) {

if ([[JSON objectForKey:@"msg"] isEqualToString:@"OK"]) {

block([JSON objectForKey:@"data"]);

}

else

{

block(@"error");

}

} failure:^(NSError *error) {

block(@"error");

}];

}

-(void)initTheUploadVideoPath:(NSString *)videoPath coverImage:(UIImage *)coverImage

{

NSLog(@"videoPath==--==%@",videoPath);

_param.videoPath = videoPath;

_param.coverImage = coverImage;

TXUGCPublish *publish = [[TXUGCPublish alloc] init];

publish.delegate = self;                                // 设置 TXVideoPublishListener 回调

[publish publishVideo:_param];

}

-(void) onPublishProgress:(NSInteger)uploadBytes totalBytes: (NSInteger)totalBytes

{

if (_theUpLoadProgress)

{

_theUpLoadProgress(uploadBytes,totalBytes);

}

}

-(void) onPublishComplete:(TXPublishResult*)result

{

if (_result)

{

_result(result);

}

}

相关文章

  • 无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章 无标题文章无标题文章无标题文章无...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • fasfsdfdf

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章

  • 无标题文章

    无标题文章 无标题文章 无标题文章无标题文章 无标题文章 无标题文章

网友评论

      本文标题:无标题文章

      本文链接:https://www.haomeiwen.com/subject/fejlrxtx.html