Type Function Return value Boolean Revision Release 2024.3703 Keywords ads, advertising, vungle See also vungle-v4.init() vungle-v4.*
vungle-v4.show()
begins playing a full-screen video ad if one is cached and available for display.
For Vungle, this API returns a boolean true
or false
depending on the availability of a cached video ad.
vungle-v4.show( adUnitType [, params] )
String. Vungle supports the following types:
"interstitial"
— default video ad unit"incentivized"
— video ad unit with optional server-to-server callback for in-app rewardsTable. A table that specifies properties for the ad request — see the next section for details.
The params
table can include properties for the ad request.
Boolean. This parameter only applies to iOS. If true
(default), the video ad will transition in with a slide effect. If false
, it will appear instantaneously.
Boolean. If true
(default), the video ad will rotate automatically with the device’s orientation. If false
, it will use the ad’s preferred orientation. This is required for Android only. For iOS, look into the orientations
key.
Number. Bitmask with the possible orientation values. Default is UIInterfaceOrientationMaskAll
.
Boolean. If true
(default), sound will be enabled during video ad playback, subject to the device’s sound settings. If false
, video playback will begin muted. Note that the user can mute or
String. This parameter only applies to the "incentivized"
ad unit type. When specified, it represents the user identifier that you wish to receive in a
local ads = require( "ads" ) local function adListener( event ) if ( event.type == "adStart" and event.isError ) then --Cached video ad not available for display end end ads.init( "vungle", "myAppId", adListener ) local adShown = ads.show( "interstitial", { isAnimated=false, isBackButtonEnabled=true } )