Background Audio Volume

Hi,


I am working on a TVML App with a ProductBundleTemplate.


<productBundleTemplate>
        <background>
            <audio>
                <asset src="path to mp3"/>
            </audio>
        </background>


I've added an Background Audio and it works fine, the only Issue is it is very loud.


Is there a way to control the volume of the Background Audio in TVML? So that it only plays 50% of the volume or so?

Answered by DTS Engineer in 131899022

Currently, there is no way to programmatically control the volume. There was a property on MPMusicPlayerController, that allowed volume control, however this has been deprecated since iOS 7.


I recommend changing the volume of the mp3 file (or whichever file type you are using). There's a way to do this in iTunes. Select your file, control-click -> Get Info -> Options tab, and there will a "volume adjust" slider that you can use. If you don't use iTunes, there are some sites online that will allow you to change the volume as well.


Hope that helps!

Accepted Answer

Currently, there is no way to programmatically control the volume. There was a property on MPMusicPlayerController, that allowed volume control, however this has been deprecated since iOS 7.


I recommend changing the volume of the mp3 file (or whichever file type you are using). There's a way to do this in iTunes. Select your file, control-click -> Get Info -> Options tab, and there will a "volume adjust" slider that you can use. If you don't use iTunes, there are some sites online that will allow you to change the volume as well.


Hope that helps!

Background Audio Volume
 
 
Q