0

HTML video tag audio not working in safari, what could be the reason?

<video id="vid" width="100%" height="1000" data-loop="true" playsinline autoplay muted preload="metadata" data-fill-mode="fill" class="ms-slide-bgvideo">
     <source src="image/video.mp4" type="video/mp4">
     <source src="movie.ogg" type="video/ogg">
</video>

js control

$('.video .icon .on').click(function(){
    $('video').prop('muted', true);
})

$('.video .icon .off').click(function(){
    $('video').prop('muted', false);
})
BadPiggie
  • 5,471
  • 1
  • 14
  • 28
Alp Selvi
  • 41
  • 1
  • 4
  • Does this answer your question? [HTML5 Video tag not working in Safari , iPhone and iPad](https://stackoverflow.com/questions/20347352/html5-video-tag-not-working-in-safari-iphone-and-ipad) – BadPiggie Jan 10 '23 at 08:07
  • no my problem is related to sound – Alp Selvi Jan 10 '23 at 08:17
  • According to the MDN Doc: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#browser_compatibility `muted` is not compatible with `safari` on `iOS` – BadPiggie Jan 10 '23 at 08:34
  • Have you tried to use WebM extension file unlike mp4 because it's highly compatible with modern browser and popular for HTML5 – Strywyr Jan 10 '23 at 08:42
  • When I make the video extension webm, the video does not appear on mobile at all – Alp Selvi Jan 10 '23 at 09:12
  • @BadPiggie on that page I see muted as compatible. – Kyle Baker Mar 01 '23 at 00:28

0 Answers0