Help Center/Details/

Self-rendering Draw Video Ads

Introduction:

Self-rendering Draw: The scene should be displayed interspersed with the application content in the application content stream, and the Draw information stream advertisement is displayed in full screen by default.

Supported ad size: vertical video (aspect ratio 16:9)

Permission:

**Self-rendering Draw video ads: ** Reclaimed and no longer available for creation

Self-rendering Draw information flow advertisement

Instructions for use

Self-rendering Draw information flow ads use the BUNativeAdsManager object to call loadAdDataWithCount: to request ads, and obtain ad-related materials by setting BUNativeAdsManagerDelegate, BUVideoAdViewDelegate, BUNativeAdDelegate agents , And click callbacks.
The usage of self-rendering Draw video information stream ads and self-rendering information stream ads are basically the same. The difference is that Draw video information stream adds support for pause playback of the video, and sets the icon style and size of the incon interface**. For details, please refer to * BUVideoAdView*.

Create an ad slot object and request an ad

BUNativeAdsManager

The advertisement slot object must be passed in when requesting an advertisement, and the advertisement slot ID and the basic advertisement configuration BUAdSlot must be passed in when the advertisement slot object is created.

Required parameters:

Field Definition Field Name Field Type Remarks
BUAdSlot / / Basic configuration
slotID Code bit NSString Code bit ID

Use BUAdSlot to create basic advertising information, use BUNativeAdsManager to call loadAdDataWithCount: to request ads

BUNativeAdsManager *nad = [BUNativeAdsManager new];
BUAdSlot *slot1 = [[BUAdSlot alloc] init];
slot1.ID = self.viewModel.slotID;
slot1.AdType = BUAdSlotAdTypeDrawVideo; //required
slot1.isOriginAd = YES; //required
slot1.position = BUAdSlotPositionTop;
slot1.imgSize = [BUSize sizeBy:BUProposalSize_DrawFullScreen];
nad.adslot = slot1;
nad.delegate = self;
self.adManager = nad;
[nad loadAdDataWithCount:3];

The detailed access method can refer to the BUDDrawVideoViewController class in demo for corresponding docking processing

Personality setting interface description

Draw video information stream ads can be set in the videoAdview of BUNativeAdRelatedView (for specific usage, see the self-rendering basic module), the icon style and size of the video playback incon, and you can also set whether** click to pause is allowed **

Callback Method Notes
@property (nonatomic, assign) BOOL drawVideoClickEnable; Whether click to pause the video is allowed, the default is NO. Only used for Draw video ads (immersive ads)
- (void)playerPlayIncon:(UIImage *)playImg playInconSize:(CGSize)playSize; Custom Pause Button Style Method Set CGSizeZero to use the picture size by default
if (!self.nativeAdRelatedView.videoAdView.superview) {
     self.nativeAdRelatedView.videoAdView.frame = CGRectMake(0, 0, GlobleWidth, GlobleHeight);
     [self.nativeAdRelatedView.videoAdView playerPlayIncon:[UIImage imageNamed:@"adPlay.png"] playInconSize:CGSizeMake(80, 80)];
     self.nativeAdRelatedView.videoAdView.drawVideoClickEnable = YES;
     [self.contentView addSubview:self.nativeAdRelatedView.videoAdView];
}

Precautions

  1. After obtaining the relevant advertisement information assignment in the material loading success method, you need to call registerContainer:withClickableViews:clickableViews to register the bound clickable View and refresh the data sourcerefreshData:.
  2. After each material information is obtained need to refresh to call refreshData: method

resource

For detailed access, please refer to the BUDDrawVideoViewController class in Demo, and for the advertisement loading request part, please refer to the loadNativeAds method

Did the content solve your problem?
Contact us