//视频转动图
+ (void)changeTypeInVideo:(NSURL*)videoPath block:(void(^)(BOOLisS))newB{
// [SVProgressHUD showWithStatus:@"视频壁纸制作中"];
[selfmp4ChangeMovInMp4File:videoPathblock:^(NSURL*file) {
if(file) {
[LivePhotoMaker makeLivePhotoByLibrary:file completed:^(NSDictionary * resultDic) {
if(resultDic) {
NSURL* videoUrl = resultDic[@"MOVPath"];
NSURL* imageUrl = resultDic[@"JPGPath"];
[LivePhotoMaker saveLivePhotoToAlbumWithMovPath:videoUrl ImagePath:imageUrl completed:^(BOOL isSuccess) {
NSLog(@"%d",isSuccess);
if(isSuccess) {
// [SVProgressHUD showSuccessWithStatus:@"制作成功"];
newB(YES);
}else{
// [SVProgressHUD showErrorWithStatus:@"再试一次"];
newB(NO);
}
}];
}else{
// [SVProgressHUD showErrorWithStatus:@"再试一次"];
newB(NO);
}
}];
}else{
// [SVProgressHUD showErrorWithStatus:@"再试一次"];
newB(NO);
}
}];
// return YES;
}