Global settings
Video ad volume control
If your app has its own volume controls (such as custom music or sound effect volumes), disclosing app volume to Google Mobile Ads SDK allows video ads to respect app volume settings. This ensures users receive video ads with the expected audio volume.
The device volume, controlled through volume buttons or OS-level volume slider, determines the volume for device audio output. However, apps can independently adjust volume levels relative to the device volume to tailor the audio experience. For app open, banner, interstitial, rewarded, and rewarded interstitial ad formats, you can report the relative app volume to the SDK through the static UGoogleAdMob::SetAppVolume()
function. Valid ad volume values range from 0.0
(silent) to 1.0
(current device volume). Here's an example of how to report the relative app volume to the SDK:
#include "GoogleAdMob.h"
// ...
UGoogleAdMob::SetAppVolume(0.5f);
To inform the SDK that the app volume has muted, use the UGoogleAdMob::SetAppMuted()
function:
#include "GoogleAdMob.h"
// ...
UGoogleAdMob::SetAppMuted(true);
By default, the app volume is set to 1
(the current device volume), and the app is not muted.
Note
Video ads that are ineligible to be shown with muted audio are not returned for ad requests made when the app volume is reported as muted or set to a value of 0. This may restrict a subset of the broader video ads pool from serving.