Music cutting out when (muted) video ads are shown

736 views
Skip to first unread message

Daniel Moosbrugger

unread,
May 7, 2018, 9:38:43 AM5/7/18
to Google Mobile Ads SDK Developers
It seems that ads (DFPBannerView) that display a video will mute music from other apps.

In application:didFinishLaunchingWithOptions: I set the volume of all ads to 0:
GADMobileAds.sharedInstance().audioVideoManager.audioSessionIsApplicationManaged = true // GADAudioVideoManagerDelegate is not set / implemented - not sure if this line in necessary
GADMobileAds.sharedInstance().applicationMuted = true

When a video ad appears, it is muted, but the audio from other apps will still be interrupted / paused.

According to https://developers.google.com/admob/ios/global-settings#changing_audio_session, background audio should play if videos are set to mute:
By default, the Mobile Ads SDK will set the audio session category to AVAudioSessionCategoryAmbient when playing ads muted. [...]

Is this a known issue, is it intended, or am I missing something?

mobileadssdk-a...@google.com

unread,
May 7, 2018, 3:06:08 PM5/7/18
to Daniel Moosbrugger, Google Mobile Ads SDK Developers
Hi there,

Thanks for reaching out to us. When audioSessionIsApplicationManaged is called, you are instructing the SDK that the AudioSession will be manually managed. Are you then manually managing this from your app? I would suggest that you go through Apple's Audio Programming Guide to learn how to do so. One way would be to set the AudioSession to AVAudioSessionCategoryOptionDuckOthers to have multi outputs even when your app is loaded.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/bf12119a-40b6-4c4f-a78f-92c2eda68afa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Moosbrugger

unread,
May 8, 2018, 6:22:56 AM5/8/18
to Google Mobile Ads SDK Developers
Hi Deepika,

thank you for your reply - I'll try settings the app's AudioSession to AVAudioSessionCategoryAmbient in the AppDelegate, as well as implementing the GADAudioVideoManagerDelegate protocol. 
On audioVideoManagerWillPlayAudio, I set it to AVAudioSessionCategoryPlayback with the duckOthers option, and on audioVideoManagerDidStopPlayingAudio I'm resetting it to AVAudioSessionCategoryAmbient. Let's see if this resolves my issue.

Thanks again,
best,
Daniel
Reply all
Reply to author
Forward
0 new messages