内容广告

引入到小视频、画文内容,当用户在查看内容时插入对应的广告

引入对应Podfile

pod 'AliyunLogProducer', '~> 2.2.15'
pod 'GDTMobSDK', '4.13.81'
pod 'Ads-Global' , '4.6.2.2', :subspecs => ['BUAdSDK','Domestic']
pod 'Google-Mobile-Ads-SDK','9.5.0'
pod 'IronSourceSDK','7.2.0.0'
pod 'MintegralAdSDK/All','7.1.1.0'
pod 'KSAdSDK', :path => "./OtherLib"
pod 'BigoADS', '1.8.5'
pod 'FBAudienceNetwork', '6.11.2'

一、Feed视频流

创建实例

  UNADContentVideoFeed *feedPage = nil;
  feedPage = [[UNADContentVideoFeed alloc] initWithUnitId:@"Adgo-unit-8070358068"];
  feedPage.videoStateDelegate = self;
  self.doubleFeedVideo = feedPage;
  UIViewController *vc  = feedPage.feedViewController;

相关回调

/**
* 视频开始播放
* @param videoContent 内容模型
*/
- (void)unad_videoDidStartPlay:(UNADContentInfo*)videoContent
{

}
/**
* 视频暂停播放
* @param videoContent 内容模型
*/
- (void)unad_videoDidPause:(UNADContentInfo*)videoContent
{

}
/**
* 视频恢复播放
* @param videoContent 内容模型
*/
- (void)unad_videoDidResume:(UNADContentInfo*)videoContent
{

}
/**
* 视频停止播放
* @param videoContent 内容模型
* @param finished     是否播放完成
*/
- (void)unad_videoDidEndPlay:(UNADContentInfo*)videoContent isFinished:(BOOL)finished
{

}
/**
* 视频播放失败
* @param videoContent 内容模型
* @param error        失败原因
*/
- (void)unad_videoDidFailedToPlay:(UNADContentInfo*)videoContent withError:(NSError *)error
{

}

二、横版视频流

创建实例

UNADContentHorizontalVideoFeed *feedPage = nil;
feedPage = [[UNADContentHorizontalVideoFeed alloc] initWithUnitId:@"Adgo-unit-9814957110"];
feedPage.videoDetailDelegate = self;
self.horizontalVideoFeed = feedPage;
UIViewController *vc = feedPage.feedViewController;
#pragma mark - UNADHorizontalFeedCallBackProtocol

/// 进入横版视频详情页
/// @param viewController 详情页VC
/// @param contentInfo 视频信息
- (void)unad_horizontalFeedDetailDidEnter:(UIViewController *)viewController contentInfo:(UNADContentInfo*)contentInfo
{

}

/// 离开横版视频详情页
/// @param viewController 详情页VC
- (void)unad_horizontalFeedDetailDidLeave:(UIViewController *)viewController
{

}

/// 视频详情页appear
/// @param viewController 详情页VC
- (void)unad_horizontalFeedDetailDidAppear:(UIViewController *)viewController
{

}

/// 详情页disappear
/// @param viewController 详情页VC
- (void)unad_horizontalFeedDetailDidDisappear:(UIViewController *)viewController
{

}

三、横版图文视频

横版图文中有图文内容,也有视频内容

创建实例

 UNADContentTextFeed *textFeed = nil;
textFeed = [[UNADContentTextFeed alloc] initWithUnitId:@"Adgo-unit-6773141202"];
textFeed.videoDetailDelegate = self;
textFeed.imageTextDelegate = self;
self.textFeed = textFeed;
UIViewController *vc = textFeed.feedViewController;

相关回调


#pragma mark - UNADHorizontalFeedCallBackProtocol

/// 进入横版视频详情页
/// @param viewController 详情页VC
/// @param contentInfo 视频信息
- (void)unad_horizontalFeedDetailDidEnter:(UIViewController *)viewController contentInfo:(UNADContentInfo*)contentInfo
{

}

/// 离开横版视频详情页
/// @param viewController 详情页VC
- (void)unad_horizontalFeedDetailDidLeave:(UIViewController *)viewController
{

}

/// 视频详情页appear
/// @param viewController 详情页VC
- (void)unad_horizontalFeedDetailDidAppear:(UIViewController *)viewController
{

}

/// 详情页disappear
/// @param viewController 详情页VC
- (void)unad_horizontalFeedDetailDidDisappear:(UIViewController *)viewController
{

}


#pragma mark - UNADImageTextDetailDelegate
/// 进入图文详情页
/// @param detailViewController 图文详情页VC
/// @param feedId feedId
- (void)unad_imageTextDetailDidEnter:(UIViewController *)detailViewController feedId:(NSString *)feedId
{

}

/// 离开图文详情页
/// @param detailViewController 图文详情页VC
- (void)unad_imageTextDetailDidLeave:(UIViewController *)detailViewController
{

}

/// 图文详情页appear
/// @param detailViewController 图文详情页VC
- (void)unad_imageTextDetailDidAppear:(UIViewController *)detailViewController
{

}

/// 图文详情页disappear
/// @param detailViewController 图文详情页VC
- (void)unad_imageTextDetailDidDisappear:(UIViewController *)detailViewController
{

}

/// 图文详情加载结果
/// @param detailViewController 图文详情页VC
/// @param success 是否成功
/// @param error error
- (void)unad_imageTextDetailDidLoadFinish:(UIViewController *)detailViewController success:(BOOL)success error:(NSError *)error
{

}

/// 图文详情阅读进度
/// @param detailViewController 图文详情页VC
/// @param isFold 是否折叠
/// @param totalHeight 详情总高度
/// @param seenHeight 已经看过的高度
- (void)unad_imageTextDetailDidScroll:(UIViewController *)detailViewController isFold:(BOOL)isFold totalHeight:(CGFloat)totalHeight seenHeight:(CGFloat)seenHeight
{

}

results matching ""

    No results matching ""