문제

I made an image and when a user clicks certain field on that image he is able to hear sound, the problem is that the file format is mp3, so all browsers except opera plays that sound fine, how can I fix that ?
Looks like this:

<audio loop id="e" src="e.mp3" preload="auto"></audio>    
<div class="string" id="ee" -->   onclick="document.getElementById('ee').play();
  document.getElementById('a').pause(); document.getElementById('a').currentTime = 0;
  document.getElementById('d').pause(); document.getElementById('d').currentTime = 0;
  document.getElementById('g').pause(); document.getElementById('g').currentTime = 0; 
  document.getElementById('b').pause(); document.getElementById('b').currentTime = 0; 
  document.getElementById('e').pause(); document.getElementById('e').currentTime = 0;">
</div>  
도움이 되었습니까?

해결책

If you want use audio element on website you must use 2 type format audio mp3 and ogg read about that

if you have only mp3 you can use this audio5js

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top