アプリに独自の音量調整機能(音楽や効果音のカスタム音量設定など)が備わっている場合、アプリの音量設定を Google Mobile Ads SDK に開示すれば、動画広告の音量にもアプリ側の音量設定を反映できます。これにより、動画広告をユーザーの想定どおりの音量で視聴してもらうことが可能になります。
デバイスの音声出力の大きさは、デバイスのボリューム(ボリューム ボタンや OS レベルのボリューム スライダーで制御)で決まります。ただし、音声の聞こえ方を独自にコントロールするために、デバイスの設定に対する相対的な音量レベルをアプリ側で独自に調節できます。
アプリ側で設定されている相対音量を Google Mobile Ads SDK に伝えるには、SetApplicationVolume() メソッドを呼び出します。広告の音量設定値の有効範囲は、0.0(無音)から 1.0(デバイスの現在の音量)までです。アプリ側の相対音量設定を SDK に伝えるコードは、たとえば次のようになります。
// Set app volume to be half of current device volume.MobileAds.SetApplicationVolume(0.5f);
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-05 UTC。"],[[["\u003cp\u003eThe \u003ccode\u003eMobileAds\u003c/code\u003e class allows you to manage global settings for the Mobile Ads SDK, including video ad volume.\u003c/p\u003e\n"],["\u003cp\u003eYou can control the volume of video ads relative to your app's volume using \u003ccode\u003eSetApplicationVolume()\u003c/code\u003e for a better user experience.\u003c/p\u003e\n"],["\u003cp\u003eMuting or lowering app volume can impact video ad eligibility and potentially reduce ad revenue, so use volume controls judiciously and only when reflecting actual user preferences.\u003c/p\u003e\n"]]],["The `MobileAds` class allows control over video ad volume. Apps with custom volume controls can set the relative app volume using `SetApplicationVolume()` with values from `0.0` (silent) to `1.0` (device volume). Muting the app is possible via `SetApplicationMuted(true)`. Default app volume is `1`, and the app is not muted. Lowering volume or muting reduces video ad eligibility and may lower revenue, thus these APIs should only reflect user volume choices.\n"],null,[]]