bboy
bboy

Reputation: 1408

HTML5 VIDEO tag not playing audio / muted

My HTML5 video starts playing (in Chrome and Safari) without audio and mute button seems disabled. so I'm unable to un-mute. the player has sound in the file, so it plays properly in a player (example vlc).

Check screen below:

<video class="media" width="920" height="520" preload="auto" poster="img/posters/poster.jpg">
    <source src="video/desktop/resized/film.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>

enter image description here

any ideas?

Upvotes: 2

Views: 11581

Answers (2)

Saheen AHZAN
Saheen AHZAN

Reputation: 3

The audio gets disabled because the browser (Which you might have used for testing like 'Live Preview' or 'Go live') you're playing the video file doesn't support the audio codec.

Screenshot of audio disabled

Open the HTML file in a supported browser like Chrome or any new browser, which supports it by default. This is guaranteed to work.

Screenshot of working audio in chrome

You may check the 'browser compatibility' section in the MDN docs as in the link below: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#browser_compatibility

Upvotes: 0

ktaro
ktaro

Reputation: 433

The audio codec is not supported for some video player and currently not supported by other browsers.Try to convert the video with proper audio codec,example MPEG AAC Audio.

Upvotes: 3

Related Questions