English
Log In
You can then view all documents
Installation/iOS/New Self-rendering patch
New Self-rendering patch
Last updated 2022-01-20 10:21:39

New Cinema Ads

Introduction

Slip ads: Slip ads are a form of video advertising. Developers can set the advertising space before/during/after playing the video in their APP. The duration of the patch advertisement can be set to a fixed duration, such as 5s/15s, etc.; the fixed duration can also be unlimited, and the system returns the highest-profit advertisement within the range of 5-60s to help developers maximize revenue. Patch ads currently only support self-rendering. You can use the default CSJ player, or you can apply to use the developer's own player.

Supported ad size: horizontal video (aspect ratio: 1.78)

Permission

Self-rendered patch ads: By default, permission is required to apply
SDK version requirements: 3400 and above

Self-rendering ad request method

Instructions for use

**Self-rendered patch ads use the BUNativeAdsManager object to call loadAdDataWithCount: to request ads. By setting BUNativeAdsManagerDelegate, BUVideoAdViewDelegate, and BUNativeAdDelegate agents, you can get ad-related materials and click callbacks. **

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 name

Field definition

Field type

Remarks

BUAdSlot

/

/

Basic configuration

slotID

Code Bit

Code Bit ID


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

复制

Note: The number of loadAdDataWithCount requests is recommended to be no more than 3 per request**

Receive ads loading results

Callback Method

Notes

nativeAdsManagerSuccessToLoad: nativeAds:

Load success callback; perform related data insertion processing in this callback

nativeAdsManager:didFailWithError:

The returned error code (error) indicates the reason why the ad failed to load. Please refer to the link for details of all error codes. Link

BUNativeAdDelegate callback description

Callback Method

Notes

nativeAdDidLoad:

Ad materials loaded successfully

nativeAd:didFailWithError:

The returned error code (error) indicates the reason why the ad failed to load. Please refer to the link for details of all error codes. Link

nativeAdDidBecomeVisible:

Ad display callback

nativeAdDidCloseOtherController: interactionType:

This callback is called when the ad jumps to another controller, and the controller is closed. InteractionType: This parameter can be distinguished from the opened appstore/webpage/video ad details page

nativeAdDidClick:withView:

Except for the video area, click will respond to this callback method

nativeAd:dislikeWithReason:

dislike button click callback, you need to process the response data in this callback method

Custom player

The media may want to use the player in their own project to control more details of the video playback. When the allowCustomVideoPlayer in the advertising material BUMaterial is YES, the media is allowed to play the video through the videoUrl provided by BUMaterialMeta, and the media needs to use the BUVideoAdReportor protocol method to report.

Custom player buried point report

The media needs to use the videoAdReportor in the BUNativeAdRelatedView to report the video playback points.

1. Create a buried point reporting tool object
复制
2. Buried point report

**The reporting of buried points is provided by the interface provided by the BUVideoAdReportor protocol, which is reported according to different playback status. **

复制

Report the buried points when the custom playback status changes

复制
Event description:

Event name

Timing of reporting

Meaning

didStartPlayVideoWithVideoDuration:

Report when the video starts

Report this event when the video starts to play, duration is the video duration

didPauseVideoWithCurrentDuration:

Report when the video is paused

Video pause is to report this event, duration is the length of time the video has been played when the video is paused

didFinishVideo

Report when the video is finished

Report this event when the video is finished

didResumeVideoWithCurrentDuration:

Report when the video is replayed

Report this event when the video is replayed, duration is the length of time the video has been played when the video is replayed

didBreakVideoWithCurrentDuration:

Report when the video is abnormal

Report when the video is abnormal, duration is the length of time the video has been played when the abnormality occurs

resource

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

SDK player access

The media uses the SDK player and needs to use the videoAdView in the BUNativeAdRelatedView to add to the self-rendered ad view. At this time, the video playback and embedding are controlled by the SDK.

复制

For detailed access, please refer to the BUDPasterContentView class in Demo. The content of BUNativeAdRelatedView needs to be refreshed with refreshData:

Switching of post ads

Multiple post advertisement media can be switched or adjusted in order according to needs, and the duration of each post advertisement can be obtained through the attribute videoDuration of BUMaterialMeta.

Post ad click event

Media self-rendered patch ads need to use registerContainer:withClickableViews:clickableViews to register the bound clickable View

复制
Click event callback:

Callback Method

Notes

Notes

- (void)videoAdViewDidClick:

SDK player click event

SDK player only

- (void)videoAdViewDidCloseOtherController:

This callback is called when the ad jumps to another controller and the controller is closed. InteractionType: This parameter can be distinguished from the opened appstore/webpage/video ad details page. Used for the callback when the SDK player clicks to close the controller.

Only for SDK players

- (void)nativeAdDidClick:withView:

The click event of the entire ad area. If the SDK player is used, it means the click event of the non-video area


- (void)nativeAdDidCloseOtherController:interactionType:

This callback is called when the ad jumps to another controller and the controller is closed. InteractionType: This parameter can be distinguished from the opened appstore/webpage/video ad details page


- (void)nativeAd:dislikeWithReason:

Using the close button provided in BUNativeAdRelatedView, the callback when the close button is clicked


For details, please refer to the BUDPasterBaseViewController class in Demo

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 source refreshData:.
  2. You need to refresh and call the refreshData: method after each material information is obtained


Contents
Contact us