Medium Rectangle Ads
Medium Rectangle (MREC) ads are 300x250 sized ads, serving both static and video, and positioned within editorial content of the app. There is no close button on MREC ads, and they are not skippable. Similar to Banner ads, MREC ads are refreshed according to a set refresh rate of between 10-120 seconds.
Showing an MREC
Implement the code below to show an MREC:
fun showBanner() {
val bannerOptions = BannerOptions().withSize(BannerSize.MREC)
// if you don't specify your container view,
// we'll display it at the bottom of the screen
.placeInContainer(YOUR_CONTAINER_VIEW_GOES_HERE)
Banner.show("placementId", bannerOptions, activity)
}private void showBanner() {
BannerOptions bannerOptions = new BannerOptions().withSize(BannerSize.MREC)
// if you don't specify your container view,
// we'll display it at the bottom of the screen
.placeInContainer(YOUR_CONTAINER_VIEW_GOES_HERE);
Banner.show("placementId", bannerOptions, activity);
}Implement the code below to request an MREC:
FYBBanner.delegate = MyBannerDelegate()
let bannerOptions = FYBBannerOptions(placementId: "1234", size: .MREC)
FYBBanner.request(with: options)#import <FairBidSDK/FairBid.h>
FYBBanner.delegate = [[MyBannerDelegate alloc] init];
NSString *placementId = @"1234";
FYBBannerOptions *bannerOptions = [[FYBBannerOptions alloc] initWithPlacementId:@"1234" size:FYBBannerSizeMREC];
[FYBBanner requestWithOptions:bannerOptions];To show an MREC ad, display the view received in the bannerDidLoad:impressionData: that’s part of FYBBannerDelegate protocol.
extension MyViewController: FYBBannerDelegate {
func bannerDidLoad(_ banner: FYBBannerAdView, impressionData: FYBImpressionData)
{
// set up the MREC banner constraints
myView.addSubview(banner)
banner.center = CGPoint(x: myView.frame.width / 2, y: myView.center.y)
}
…
}This feature is not available on Unity.
Last updated

