Help Center/Details/

Full screen video

Introduction

Full-screen video is a full-screen video advertisement. The user can perform a 5s skip operation, and the end card page will be displayed, and the interactive page will be displayed after the video is played. The display scene of full-screen video ads is when the application function is naturally interrupted, such as between game levels. Full-screen video ads should not appear suddenly, and should not interfere with the normal flow of users using the app, such as app loading, exiting the app, or during the game.

Supported ad sizes: Full screen horizontal screen (aspect ratio 16:9), full screen vertical screen (aspect ratio 9:16)

Permission

**Template rendering full screen video: **Open by default
SDK rendering full-screen video: has been recycled and no longer provides creation

Code bit ID creation parameter description:

The developer selects the video playback direction according to the display scene: horizontal or vertical

Template rendering full-screen video ads

Instructions for use

The template full-screen video uses the BUNativeExpressFullscreenVideoAd object to call loadAdData to request an advertisement, and uses the BUNativeExpressFullscreenVideoAd object to call showAdFromRootViewController: to display the advertisement. By setting the BUNativeExpressFullscreenVideoAdDelegate agent, get the advertisement, display, Click, close and other callbacks.

Create an ad slot object and request an ad

BUNativeExpressFullscreenVideoAd

You need to pass in the ad slot object when requesting an ad, and the ad slot id must be passed in when the ad slot object is created

Required parameters:

Field Definition Field Name Field Type Remarks
SlotID Ad Slot NSString Code Slot ID

Use BUNativeExpressFullscreenVideoAd to create an object, use BUNativeExpressFullscreenVideoAd to call loadAdData to request ads

self.fullscreenAd = [[BUNativeExpressFullscreenVideoAd alloc] initWithSlotID:slotID];
self.fullscreenAd.delegate = self;
[self.fullscreenAd loadAdData];

Receive ads loading results

BUNativeExpressFullscreenVideoAdDelegate

Callback Method Notes
nativeExpressFullscreenVideoAd: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
nativeExpressFullscreenVideoAdViewRenderFail:error Rendering failed, the rendering failed due to network or hardware reasons, you can replace the mobile phone or network environment test. It is recommended to upgrade to the latest version of the CSJ SDK
nativeExpressFullscreenVideoAdDidLoad Creative materials loaded successfully
nativeExpressFullscreenVideoAdDidDownLoadVideo Video download completed

BUNativeExpressFullscreenVideoAdDelegate callback description

Callback Method Notes
nativeExpressFullscreenVideoAdDidLoad: This callback enters to prove that the ad material has been successfully loaded
nativeExpressFullscreenVideoAd: didFailWithError: This callback method can locate the error code corresponding to the specific failure reason, and just print the error. Please see the link for details of all error codes. Link
nativeExpressFullscreenVideoAdViewRenderSuccess: Rendering success callback method
nativeExpressFullscreenVideoAdViewRenderFail:error: Entering this callback proves that the rendering failure condition is triggered, and the mobile phone or network environment test can be replaced. It is recommended to directly upgrade to the latest version of the CSJ platform
nativeExpressFullscreenVideoAdDidDownLoadVideo: Advertising is displayed in this callback method to ensure smooth playback and smooth display, and a better user experience.
nativeExpressFullscreenVideoAdWillVisible: The template full-screen ad will be displayed soon, callback
nativeExpressFullscreenVideoAdDidVisible: The template full screen ad has been displayed callback
nativeExpressFullscreenVideoAdDidClick: Click callback
nativeExpressFullscreenVideoAdDidClickSkip: Clicking for 5s to skip will trigger this callback. If you need to do related logic processing when the user clicks to skip, you can perform related logic processing in this callback
nativeExpressFullscreenVideoAdWillClose: This callback method knows that the user has closed the advertisement, and the corresponding logic processing when the user closes the advertisement can be performed in this callback method
nativeExpressFullscreenVideoAdDidClose: Clicking the close button will trigger this callback
nativeExpressFullscreenVideoAdDidPlayFinish: This callback will be triggered when the ad is played
nativeExpressFullscreenVideoAdCallback:withType: This callback can know the ad type of the template fullscreen video
nativeExpressFullscreenVideoAdDidCloseOtherController: 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

By setting BUNativeExpressFullscreenVideoAdDelegate agent, get callbacks such as advertisement, display, click, and close. For other proxy methods, please refer to the section of BUDExpressFullScreenVideoViewController#pragma mark-BUFullscreenVideoAdDelegate in demo

Display ads

Full-screen video ads should not have incentive display rules such as watch the video for coins or rewards, and allow users to skip the ad after 5 seconds. Developers should not change the setting of when users can skip ads or add any other skip features.

Call the showAdFromRootViewController: method to display rewarded video ads, where the currently displayed page needs to be passed in. Be sure to set rootViewController, which is the viewController needed to display ads and jump landing pages. It is recommended that developers allow users to watch ads after receiving the nativeExpressFullscreenVideoAdDidDownLoadVideo callback to ensure smooth playback And the display is smooth, and the user experience is better.

Show full screen video ads

//WKWebview will be rendered during show. It is recommended to display up to three ads at a time. If there are more than 3, it will cause WKWebview rendering to fail. Of course, under normal circumstances, only one full-screen video will be shown at a time
if (self.fullscreenAd) {
   [self.fullscreenAd showAdFromRootViewController:self];
}

Timing

Allow users to watch ads after receiving the nativeExpressFullscreenVideoAdDidDownLoadVideo callback, which can ensure smooth playback and smooth display, and a better user experience.

-(void)nativeExpressFullscreenVideoAdDidDownLoadVideo:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd {
//Ads are displayed after this callback method, which can ensure smooth playback and smooth display, and a better user experience.
}

Reload the ad after the ad is shown

**The ads with the same request can only be counted for one impression at most, and repeated impressions will be filtered by the system. ** Therefore, it is recommended that developers set the original ad object to nil in the nativeExpressFullscreenVideoAdDidClose callback after the user has watched the ad to ensure that the ad object is the new request object

-(void)nativeExpressFullscreenVideoAdDidClose:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd {
//In this callback method, the advertisement can be blanked
}

Precautions

  1. rootViewController must be set to handle ad jumps. All jumps in the SDK adopt the method of present. Please ensure that the rootViewController passed in cannot be empty and no other controllers are presented, otherwise the presentedViewController will already exist and the presentation will fail.
  2. nativeExpressFullscreenVideoAdViewRenderSuccess The rendering success callback will return after ** the ad is displayed**
  3. In order to ensure smooth playback and smooth display, and a better user experience, the advertisement will be displayed after receiving the nativeExpressFullscreenVideoAdDidDownLoadVideo callback
  4. Determine whether the ad is effective directly using self.fullscreenAd to judge
  5. Personalized template ads In order to optimize the display speed, local templates will be used, and relevant data will be intercepted when requesting. If the access party is using the H5 page to send the request, the request body will be cleared, and the other logic will remain unchanged. If you use body transmission Please change to other methods. For example: jsBridge method.
  6. Every time data is requested, a new BUNativeExpressFullscreenVideoAd object needs to be reinitialized. Do not reuse the locally cached full-screen video object for multiple display.

resource

For detailed access, please refer to the BUDExpressFullScreenVideoViewController class in Demo, the advertisement loading request part can refer to the loadFullscreenVideoAdWithSlotID method, and the advertisement display part can refer to the showFullscreenVideoAd method

SDK rendering full screen video ads

Instructions for use

The SDK renders full-screen video. Use the BUFullscreenVideoAd object to call loadAdData to request an advertisement, and use the BUFullscreenVideoAd object to call showAdFromRootViewController: to display the advertisement. By setting the BUFullscreenVideoAdDelegate agent, get the advertisement and display , Click, close and other callbacks.

Create an ad slot object and request an ad

Every time you need to generate a new BUFullscreenVideoAd object, call the loadAdData method to request the latest full-screen video. Please do not reuse the local cached full-screen video for multiple display.

BUFullscreenVideoAd

You need to pass in the ad slot object when requesting an ad, and the ad slot id must be passed in when the ad slot object is created
Required parameters:

Field Definition Field Name Field Type Remarks
SlotID Ad Slot NSString Code Slot ID

Use BUFullscreenVideoAd to create an object, use BUFullscreenVideoAdCall loadAdData to request an ad

//Ensure that the advertising object requested each time is a new advertising object, and avoid reusing the same object for advertising requests
self.fullscreenVideoAd = [[BUFullscreenVideoAd alloc] initWithSlotID:slotID];
self.fullscreenVideoAd.delegate = self;
[self.fullscreenVideoAd loadAdData];

Receive ads loading results

BUFullscreenVideoAdDelegate

Callback Method Notes
fullscreenVideoAd: 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
fullscreenVideoMaterialMetaAdDidLoad: The creative material is loaded successfully
fullscreenVideoAdVideoDataDidLoad: Video cache success

BUFullscreenVideoAdDelegate callback description

Callback Method Notes
fullscreenVideoMaterialMetaAdDidLoad: The creative material is loaded successfully
fullscreenVideoAd: 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
fullscreenVideoAdVideoDataDidLoad: Video cache success
fullscreenVideoAdWillVisible: Ad is about to display callback
fullscreenVideoAdDidVisible: Ad has been displayed callback
fullscreenVideoAdDidClick: Click callback
fullscreenVideoAdWillClose: Ad is about to be closed callback
fullscreenVideoAdDidClose: Callback when the ad is closed
fullscreenVideoAdDidPlayFinish: didFailWithError: This callback will be entered when the ad playback is completed or an error occurs, just print the error. Please see the link for details of all error codes. Link
fullscreenVideoAdDidClickSkip: This callback method is triggered when the skip button is clicked
fullscreenVideoAdCallback: withType: This callback can know the ad type of the fullscreen video

By setting BUFullscreenVideoAdDelegate agent, get callbacks such as advertisement, display, click, and close. For other proxy methods, please refer to the section of BUDFullscreenViewController class#pragma mark-BUFullscreenVideoAdDelegate in Demo

Display ads

Full-screen video ads should not have incentive display rules such as "Watch the video for gold coins or rewards", and allow users to skip the ad after 5 seconds. Developers should not change the setting of when users can skip ads or add any other skip features.

Call the showAdFromRootViewController: method to display the full-screen video ad, where the currently displayed page needs to be passed in. Be sure to set up rootViewController, which is the viewController needed to display ads and jump landing pages. It is recommended that developers allow users to watch ads after receiving the fullscreenVideoAdVideoDataDidLoad callback to ensure smooth playback And the display is smooth, and the user experience is better.

Show full screen video ads

if (self.fullscreenAd) {
   [self.fullscreenAd showAdFromRootViewController:self];
}

Timing:

Allow users to watch ads after receiving the fullscreenVideoAdVideoDataDidLoad callback, which can ensure smooth playback and smooth display, and a better user experience.

-(void)fullscreenVideoAdVideoDataDidLoad:(BUFullscreenVideoAd *)fullscreenVideoAd {
 //Ads are displayed after this callback method, which can ensure smooth playback and smooth display, and a better user experience.
}

Reload the ad after the ad is shown

The ads of the same request can only be counted for one impression at most, and repeated impressions will be filtered by the system. Therefore, it is recommended that developers set the original ad object to nil in the fullscreenVideoAdDidClose callback after the user has watched the ad to ensure that the ad object is the new request object

-(void)fullscreenVideoAdDidClose:(BUFullscreenVideoAd *)fullscreenVideoAd {
  //You can set the advertising object to nil in this callback
}

Precautions

  1. rootViewController must be set to handle ad jumps. All jumps in the SDK adopt the method of present. Please ensure that the rootViewController passed in cannot be empty and no other controllers are presented, otherwise the presentedViewController will already exist and the presentation will fail.
  2. In order to ensure smooth playback and smooth display, and a better user experience, the advertisement will be displayed after receiving the fullscreenVideoAdVideoDataDidLoad callback
  3. To judge whether the advertisement is effective, just use self.fullscreenAd to judge
  4. Every time you request data, you need to re initialize a new BUFullscreenVideoAd object. Do not reuse the locally cached full-screen video object for multiple display.

resource

For detailed access, please refer to the BUDFullscreenViewController class in Demo, the advertisement loading request part can refer to the loadFullscreenVideoAdWithSlotID method, and the advertisement display part can refer to the showFullscreenVideoAd method.
与此原文有关的更多信息要查看其他翻译信息,您必须输入相应原文
发送反馈
侧边栏
历史记录
已保存
提供建议
已超过 5,000 个字符数上限。如需翻译更多内容,请使用箭头按钮。

Did the content solve your problem?
Contact us