Managing Audio

Nimbus allows your application to manually set the volume, customize the mute button, and mute or unmute ads.

Customizing Volume / Muting Ads

If your application allows users to define music or sound's volume, it is recommended to Ads use the same volume set by the user.

In order to accomplish that Nimbus allows you to set the custom volume using the AdManager or AdView object.

// Custom volume - ranges from 0 to 100 
adManager.volume = 60
//or
nimbusAdView.volume = 60 

// Mute ads
adManager.volume = 60
// or
nimbusAdView.volume = 0

Hide Mute Button

Nimbus SDK allows your application to hide the mute button if you prefer.

// After initializing the Nimbus SDK
let videoRenderer = NimbusVideoAdRenderer()
videoRenderer.showMuteButton = true
Nimbus.shared.renderers = [
     // Include here any other renders that you may use.
     .forAuctionType(.video): videoRenderer
]

Last updated