修改了特效礼物配置出问题的时候无法播放的问题

This commit is contained in:
fengshuo
2022-10-26 19:07:50 +08:00
parent 8715dfd968
commit 95716a8d80
2 changed files with 10 additions and 17 deletions

View File

@@ -1284,20 +1284,12 @@
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice; giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
} }
/// if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
if (giftTotal >= 520) { receiveInfo.viewUrl = giftInfo.viewUrl;
/// [self.giftEffectQueue addObject:receiveInfo];
receiveInfo.vggUrl = giftInfo.vggUrl; } else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && roomInfor.hasAnimationEffect) {///SVGA
receiveInfo.viewUrl = giftInfo.viewUrl; receiveInfo.vggUrl = giftInfo.vggUrl;
[self.giftEffectQueue addObject:receiveInfo]; [self.giftEffectQueue addObject:receiveInfo];
} else {
if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
receiveInfo.viewUrl = giftInfo.viewUrl;
[self.giftEffectQueue addObject:receiveInfo];
} else if (giftInfo.hasVggPic && roomInfor.hasAnimationEffect) {///SVGA
receiveInfo.vggUrl = giftInfo.vggUrl;
[self.giftEffectQueue addObject:receiveInfo];
}
} }
} }
@@ -1369,10 +1361,10 @@
[springAnimation setAnimationDidStartBlock:^(POPAnimation *anim) { [springAnimation setAnimationDidStartBlock:^(POPAnimation *anim) {
@kStrongify(self); @kStrongify(self);
if (giftInfo.viewUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) { if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
[self largeGiftStopCarEffect:giftInfo.goldPrice]; [self largeGiftStopCarEffect:giftInfo.goldPrice];
[self playGiftEffectWithVapUrl:giftInfo.viewUrl]; [self playGiftEffectWithVapUrl:giftInfo.viewUrl];
} else if (giftInfo.hasVggPic && [self.delegate getRoomInfo].hasAnimationEffect) { } else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
[self largeGiftStopCarEffect:giftInfo.goldPrice]; [self largeGiftStopCarEffect:giftInfo.goldPrice];
[self playGiftEffect:giftInfo.vggUrl]; [self playGiftEffect:giftInfo.vggUrl];
} }
@@ -1380,7 +1372,7 @@
[view pop_addAnimation:springAnimation forKey:@"spingOutAnimation"]; [view pop_addAnimation:springAnimation forKey:@"spingOutAnimation"];
} else { } else {
if (receiveInfo.viewUrl.length > 0) {//vap if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && receiveInfo.viewUrl.length > 0) {//vap
[self largeGiftStopCarEffect:giftInfo.goldPrice]; [self largeGiftStopCarEffect:giftInfo.goldPrice];
[self playGiftEffectWithVapUrl:receiveInfo.viewUrl]; [self playGiftEffectWithVapUrl:receiveInfo.viewUrl];
} else if (receiveInfo.vggUrl.length > 0) {/// } else if (receiveInfo.vggUrl.length > 0) {///

View File

@@ -132,7 +132,8 @@
[XCHUDTool showErrorWithMessage:@"个播背景图加载失败"]; [XCHUDTool showErrorWithMessage:@"个播背景图加载失败"];
}]; }];
return; return;
} }
self.backImageView.image = [UIImage imageNamed:@"room_background"];
[self.svgDisplayView stopAnimation]; [self.svgDisplayView stopAnimation];
self.svgDisplayView.hidden = YES; self.svgDisplayView.hidden = YES;
self.backImageView.contentMode = UIViewContentModeScaleAspectFill; self.backImageView.contentMode = UIViewContentModeScaleAspectFill;