开发者

audio file embed

开发者 https://www.devze.com 2023-04-01 17:16 出处:网络
I am embedding a audio file and having a issue. When accessing the page where the audio file is on some web browsers i am prompted to download a quicktime plugin. I don\'t want anyone to need a plugin

I am embedding a audio file and having a issue. When accessing the page where the audio file is on some web browsers i am prompted to download a quicktime plugin. I don't want anyone to need a plugin to play it or id at least want it in a format where most people already have the plugin. Here is how i embedded it:

<EMBED src="http://ente开发者_Go百科rsociety.com/wordpress6/demo6/wp-content/themes/Brodys/images2/08_Track_8.mp3" autostart=true hidden=true>

I want to keep it hidden and have it auto start.


Not all browsers will be able to play MP3 files natively. Your best bet is to use multiple formats to support the most amount of browsers possible:

<audio hidden autoplay preload="auto"> 
  <source src="elvis.mp3" />
  <source src="elvis.ogg" />
  <!-- now include flash fall back -->
</audio>

But in short, embedded audio is still very much a work in progress for most browsers and their support for formats is all over the place.

This article shows the native support per browser: http://www.w3schools.com/html5/html5_audio.asp

Edit: WAV seems to be the most heavily supported - but is probably going to come with size impacts compared to MP3, and still isn't supported by IE.

0

精彩评论

暂无评论...
验证码 换一张
取 消