3

What I'm trying to do is to make the autoplay video on ios 10 using HTML5 and I did that using:

<video autoplay loop muted playsinline controls> <source src="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"> </video> 

But when using IMA SDK for HTML5 the ad start unmuted and therefore the autoplay will not work.

Is there a way to mute the ads on start (initialize the ads muted)?

1

1 Answer 1

2

You have to mute AdsManager it after google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED event.

loader = new google.ima.AdsLoader(...); loader.addEventListener( google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, (event) => { event.getAdsManager(videoTag).setVolume(0); } 
Sign up to request clarification or add additional context in comments.

1 Comment

thanks for sharing this, also if there a way to unmute ad when the user clicks on the unmute button?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.