1.修复bug
This commit is contained in:
@@ -1085,7 +1085,7 @@
|
||||
make.height.mas_equalTo(KScreenHeight);
|
||||
}];
|
||||
}
|
||||
[self.carVapEffectView setMute:YES];
|
||||
[self.carVapEffectView setMute:NO];
|
||||
[self.carVapEffectView playHWDMP4:videoUrl repeatCount:1 delegate:self];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
@@ -2176,7 +2176,7 @@
|
||||
make.height.mas_equalTo(KScreenHeight);
|
||||
}];
|
||||
}
|
||||
[self.vapGiftEffectView setMute:YES];
|
||||
[self.vapGiftEffectView setMute:NO];
|
||||
[self.vapGiftEffectView playHWDMP4:vapUrl repeatCount:1 delegate:self];
|
||||
return;
|
||||
}
|
||||
@@ -2192,7 +2192,7 @@
|
||||
make.height.mas_equalTo(KScreenHeight);
|
||||
}];
|
||||
}
|
||||
[self.vapGiftEffectView setMute:YES];
|
||||
[self.vapGiftEffectView setMute:NO];
|
||||
[self.vapGiftEffectView playHWDMP4:videoUrl repeatCount:1 delegate:self];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
@@ -2298,7 +2298,7 @@
|
||||
make.height.mas_equalTo(KScreenHeight);
|
||||
}];
|
||||
}
|
||||
[self.luckyVapGiftEffectView setMute:YES];
|
||||
[self.luckyVapGiftEffectView setMute:NO];
|
||||
[self.luckyVapGiftEffectView playHWDMP4:vapUrl repeatCount:1 delegate:self];
|
||||
return;
|
||||
}
|
||||
@@ -2313,7 +2313,7 @@
|
||||
make.height.mas_equalTo(KScreenHeight);
|
||||
}];
|
||||
}
|
||||
[self.luckyVapGiftEffectView setMute:YES];
|
||||
[self.luckyVapGiftEffectView setMute:NO];
|
||||
[self.luckyVapGiftEffectView playHWDMP4:videoUrl repeatCount:1 delegate:self];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
|
@@ -70,7 +70,7 @@
|
||||
_musicInfo = musicInfo;
|
||||
if (_musicInfo) {
|
||||
self.musicAlbumImageView.image = [UIImage imageWithData:_musicInfo.songAlbum];
|
||||
self.songNameLabel.text = _musicInfo.songName;
|
||||
self.songNameLabel.text = _musicInfo.musicName;
|
||||
self.authorLabel.text = _musicInfo.author;
|
||||
}
|
||||
}
|
||||
|
@@ -315,7 +315,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey;
|
||||
- (void)setCurrentMusic:(Music *)currentMusic {
|
||||
_currentMusic = currentMusic;
|
||||
if (_currentMusic) {
|
||||
self.titleLabel.text = _currentMusic.songName;
|
||||
self.titleLabel.text = _currentMusic.musicName;
|
||||
} else {
|
||||
self.titleLabel.text = YMLocalizedString(@"XPRoomBackMusicPlayerView3");
|
||||
}
|
||||
|
@@ -484,13 +484,13 @@
|
||||
NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"];
|
||||
NSString *fullPath = [filePath stringByAppendingPathComponent:fileName];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){
|
||||
[view setMute:YES];
|
||||
[view setMute:NO];
|
||||
[view playHWDMP4:fullPath repeatCount:1 delegate:self];
|
||||
|
||||
}else{
|
||||
[self.vapParser parseWithURL:encodingUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
if (videoUrl.length) {
|
||||
[view setMute:YES];
|
||||
[view setMute:NO];
|
||||
[view playHWDMP4:videoUrl repeatCount:1 delegate:self];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
|
@@ -289,13 +289,13 @@
|
||||
NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"];
|
||||
NSString *fullPath = [filePath stringByAppendingPathComponent:fileName];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){
|
||||
[self.trialsView setMute:YES];
|
||||
[self.trialsView setMute:NO];
|
||||
[self.trialsView playHWDMP4:fullPath repeatCount:1 delegate:self];
|
||||
|
||||
}else{
|
||||
[self.vapParser parseWithURL:encodingUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
if (videoUrl.length) {
|
||||
[self.trialsView setMute:YES];
|
||||
[self.trialsView setMute:NO];
|
||||
[self.trialsView playHWDMP4:videoUrl repeatCount:1 delegate:self];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
|
@@ -378,26 +378,10 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
///缓存新的礼物动效数据
|
||||
-(void)cacheGiftDynamicEffectList:(NSSet *)list{
|
||||
[UploadFile downloadGiftDynamicEffectWithList:list completion:^(BOOL isSuccess, NSMutableArray * _Nonnull failList) {
|
||||
if(isSuccess == NO){
|
||||
if(self.downloadGiftCount > 3 || failList.count == 0){
|
||||
return;
|
||||
}
|
||||
[self downloadGiftDynamicEffectWithList:failList];
|
||||
}
|
||||
}];
|
||||
}
|
||||
-(void)downloadGiftDynamicEffectWithList:( NSMutableArray * )requestList{
|
||||
NSSet *setList = [[NSSet alloc]initWithArray:requestList];
|
||||
[UploadFile downloadGiftDynamicEffectWithList:setList completion:^(BOOL isSuccess, NSMutableArray * _Nonnull failList) {
|
||||
if(isSuccess == NO){
|
||||
if(self.downloadGiftCount > 3 || failList.count == 0){
|
||||
return;
|
||||
}
|
||||
self.downloadGiftCount++;
|
||||
[self downloadGiftDynamicEffectWithList:failList];
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)dealWithGiftList{
|
||||
///删除旧数据缓存,
|
||||
NSString *svgaFileName = @"/GiftSvga";
|
||||
|
@@ -277,8 +277,9 @@ static UploadFile* manager;
|
||||
}
|
||||
|
||||
+(void)downloadGiftDynamicEffectWithList:(NSSet *)list completion:(void (^) (BOOL isSuccess, NSMutableArray *editAudioPath))completion{
|
||||
|
||||
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
|
||||
manager.operationQueue.maxConcurrentOperationCount = 20; // 控制并发数量
|
||||
manager.operationQueue.maxConcurrentOperationCount = 10; // 控制并发数量
|
||||
dispatch_group_t requestGroup = dispatch_group_create();
|
||||
NSMutableArray *failList = [NSMutableArray array];
|
||||
for (NSString *giftUrl in list) {
|
||||
@@ -311,9 +312,9 @@ static UploadFile* manager;
|
||||
dispatch_group_notify(requestGroup, dispatch_get_main_queue(), ^{
|
||||
if(failList.count > 0){
|
||||
completion(NO,failList);
|
||||
NSLog(@"下载有失败");
|
||||
NSLog(@"下载有失败,失败数:%ld,成功数:%ld,总数:%ld",failList.count,list.count - failList.count,list.count);
|
||||
}else{
|
||||
NSLog(@"下载全部完成");
|
||||
NSLog(@"下载全部完成,总数:%ld",list.count);
|
||||
completion(NO,nil);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user