ukrein
ukrein

Reputation: 1

HTML5 video I want autoplay & muted until sound is initiated, but is permanently muted on iPhone Mobile

I have an HTML5 video embeded in a portfolio I want to autoplay & be muted until sound is initiated, so when a user is scrolling down the page it's already playing but there isn't annoying sound for the user. It is working fine on all browsers on my desktop and tablet, however on iPhone mobile the sound is permanently muted, even when a user tries to adjust the volume. Here here's the code I am using, is there some javascript I can implement/use instead that will solve this?

<video id="cla-generic" preload="auto" onclick="this.paused?this.play():this.pause()" autoplay controls muted loop>
<source src="video.mp4"/>
</video>

Upvotes: 0

Views: 198

Answers (1)

user7804102
user7804102

Reputation:

Autoplay does not work on iOS and android.

Thats why you are getting no sound.

Take a look at this thread: iPhone HTML5 Audio tag not working

Upvotes: 1

Related Questions