how can I use html5 <audio> tag to play aac file?

后端 未结 3 1413
栀梦
栀梦 2021-01-12 05:27

I can get it to work in safari but doesn\'t work in chrom

3条回答
  •  走了就别回头了
    2021-01-12 06:10

    Only Safari and IE support .aac. Here is what each browser supports:

    • Internet Explorer 9.0+: .mp3, .aac
    • Chrome: .ogg, .mp3, .wav, .aac*
    • Firefox: .ogg, .wav
    • Safari: .mp3, .aac, .wav
    • Opera: .ogg, .wav

    * Chrome seems to support .aac but it isn't included in the list of officially supported file extensions.

    I suggest using both .ogg and .mp3 or .ogg and .aac to cover all bases.

    References

    • HTML 5 Doctor - HTML5 audio, the state of play
    • Chromium - Audio/Video

提交回复
热议问题