Starting with Vungle Windows SDK 5.1.0+, Vungle supports MREC video ads. MREC is an abbreviation for "medium rectangle" ads. Unlike interstitial ads, MREC ads do not require a fullscreen view. Similar to banner ads, MREC video ads are rectangular ads occupying a location anywhere within the app's layout, typically displayed on the top or bottom of the screen, so that the user can continue to interact with the app while the ad is playing. The container size to render an MREC ad is the industry standard: 300x250.
VungleAdControl achieves video ads in MREC formats by passing a custom container to the Vungle SDK through the
AdConfig.AdContainer property and managing the content of
Container.Content of the host app.
- Windows SDK 5.1.0+
- Windows 10 UWP
- MREC placement configured on Vungle dashboard
VungleAdControlwith width 300 and height 250
Vungle MREC creatives are optimized to play in viewing container with size of 300 x 250. Make sure the viewing size in
VungleAdContrl is no smaller than 300 in width and 250 in height.
<UI:VungleAdControl x:Name="embeddedControl" Width="300" Height="250" />
Step 1. Complete Basic Integration
To integrate MREC ads in your Windows app, begin by following the instructions in the basic integration article. This article contains supplementary information and assumes you have completed basic integration.
Step 2. Load, Play, and Close an MREC Ad
Loading a MREC ad using a MREC placement is identical as loading a full-screen ad.
Playing an ad using
VungleAdControl requires you to pass
Placement. You can also configure MREC ads to start playing as muted by setting
||Application ID must identical|
||Placement reference ID for your MREC|
embeddedControl.AppID = "VUNGLE_APP_ID"; embeddedControl.Placement = "MREC_PLACEMENT_REFERENCE_ID"; embeddedControl.SoundEnabled = false; // Optional (default = true) await embeddedControl.PlayAdAsync();
You can use
StopBannerAd to stop displaying an MREC ad at anytime.
VungleAdControl provides a simpler way to integrate MREC ads if you don't need event listeners, or to control the timing of ad load. Once the SDK is initialized, it will load an MREC ad automatically, and you can issue
PlayAdAsync once the ad assets complete downloading.
<UI:VungleAdControl x:Name="embeddedControl" Width="300" Height="250" Placement="MREC_PLACEMENT_REFERENCE_ID" SoundEnabled="False" />