Volume implementation problems (IMA HTML5 SDK)

410 views
Skip to first unread message

Dany N'guyen Dinh Thinh

unread,
Jul 31, 2013, 5:49:10 AM7/31/13
to ima...@googlegroups.com
Hi !

I want to add a mute/unmute button (and volume control) but when i try tu use getAdVolume() or setAdVolume() i caught "getAdVolume is not a function".

Can you help me? 

Tim

unread,
Jul 31, 2013, 6:40:48 AM7/31/13
to ima...@googlegroups.com
Hello Dany,
I think you should be able to use the function setVolume() on the AdsManager like this:

Full volume:
adsManager.setVolume(1);

Mute:
adsManager.setVolume(0);

According to the docs the getVolume() method doesn't work for HTML5. You can find the docs here: https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdsManager

Cheers,
Tim

Shawn Busolits (IMA SDK Team)

unread,
Jul 31, 2013, 10:29:28 AM7/31/13
to ima...@googlegroups.com
Thanks for the response Tim! That's correct, getVolume (not getAdVolume) is defined for the HTML5 SDK, but at the moment it's just a no-op. You can use setVolume to change the volume of the ad, as Tim pointed out.

Thanks,
Shawn Busolits
IMA SDK Team

Dany N'guyen Dinh Thinh

unread,
Jul 31, 2013, 11:15:35 AM7/31/13
to ima...@googlegroups.com
It works ! Thanks !
Reply all
Reply to author
Forward
0 new messages