Commit bfefcac8 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent e7976652
...@@ -10,7 +10,15 @@ ...@@ -10,7 +10,15 @@
@implementation GYAdsManager(Flow) @implementation GYAdsManager(Flow)
- (void)adsFlowForModels:(NSArray<GYAdsTrackModel *> *)models{ - (void)adsFlowForModels:(NSArray<GYAdsTrackModel *> *)models{
[self adsFlowForModel:models.firstObject]; self.bigImageModels = models.mutableCopy;
self.bigImageIndex = 0;
[self adsFlowPrepareModel];
}
- (void)adsFlowPrepareModel{
if (self.bigImageIndex < self.bigImageModels.count) {
[self adsFlowForModel:self.openScreenModels[self.bigImageIndex]];
}
} }
- (void)adsFlowForModel:(GYAdsTrackModel *)model{ - (void)adsFlowForModel:(GYAdsTrackModel *)model{
...@@ -77,7 +85,8 @@ ...@@ -77,7 +85,8 @@
} }
- (void)nativeExpressAdFailToLoad:(BUNativeExpressAdManager *)nativeExpressAd error:(NSError *)error { - (void)nativeExpressAdFailToLoad:(BUNativeExpressAdManager *)nativeExpressAd error:(NSError *)error {
self.videoIndex += 1;
[self adsFlowPrepareModel];
} }
- (void)nativeExpressAdViewRenderSuccess:(BUNativeExpressAdView *)nativeExpressAdView { - (void)nativeExpressAdViewRenderSuccess:(BUNativeExpressAdView *)nativeExpressAdView {
...@@ -98,7 +107,8 @@ ...@@ -98,7 +107,8 @@
} }
- (void)feedAdsManager:(KSFeedAdsManager *)adsManager didFailWithError:(NSError *_Nullable)error { - (void)feedAdsManager:(KSFeedAdsManager *)adsManager didFailWithError:(NSError *_Nullable)error {
self.videoIndex += 1;
[self adsFlowPrepareModel];
} }
#pragma mark - KSFeedAdDelegate #pragma mark - KSFeedAdDelegate
- (void)feedAdViewWillShow:(KSFeedAd *)feedAd { - (void)feedAdViewWillShow:(KSFeedAd *)feedAd {
...@@ -145,9 +155,10 @@ ...@@ -145,9 +155,10 @@
{ {
NSLog(@"%s",__FUNCTION__); NSLog(@"%s",__FUNCTION__);
NSLog(@"Express Ad Load Fail : %@",error); NSLog(@"Express Ad Load Fail : %@",error);
self.videoIndex += 1;
[self adsFlowPrepareModel];
} }
#pragma mark - GDTNativeExpressProAdViewDelegate; #pragma mark - GDTNativeExpressProAdViewDelegate;
- (void)gdt_NativeExpressProAdViewRenderSuccess:(GDTNativeExpressProAdView *)nativeExpressAdView - (void)gdt_NativeExpressProAdViewRenderSuccess:(GDTNativeExpressProAdView *)nativeExpressAdView
{ {
......
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
if (self.videoIndex < self.videoModels.count) { if (self.videoIndex < self.videoModels.count) {
[self rewardedVideoForModel:self.videoModels[self.videoIndex]]; [self rewardedVideoForModel:self.videoModels[self.videoIndex]];
} }
// else{
// if (self.adsFinishCallBack) {
// self.adsFinishCallBack(true, [UIView new]);
// }
// }
} }
- (void)rewardedVideoForModel:(GYAdsTrackModel *)model{ - (void)rewardedVideoForModel:(GYAdsTrackModel *)model{
...@@ -30,11 +35,10 @@ ...@@ -30,11 +35,10 @@
}else if ([model.adPlatform isEqualToString:@"kuaishou"]){ }else if ([model.adPlatform isEqualToString:@"kuaishou"]){
[self videoForKS:model]; [self videoForKS:model];
}else{ }else{
if (self.adsFinishCallBack) { self.videoIndex += 1;
self.adsFinishCallBack(true, nil); [self videoPrepareModel];
}
} }
NSLog(@"common_bigimage============%@", model.adPlatform); NSLog(@"common_vidoe============%@", model.adPlatform);
} }
- (void)videoForCSJ:(GYAdsTrackModel *)model{ - (void)videoForCSJ:(GYAdsTrackModel *)model{
...@@ -73,6 +77,7 @@ ...@@ -73,6 +77,7 @@
} }
- (void)playVideo{ - (void)playVideo{
if ([self.currentAdsModel.adPlatform isEqualToString:@"chuanshanjia"]) { if ([self.currentAdsModel.adPlatform isEqualToString:@"chuanshanjia"]) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.75* NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.75* NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment