html5 audio livestreaming

后端 未结 2 1866
日久生厌
日久生厌 2020-12-25 14:40

I\'m creating my own audio, without controls of the browser.

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-25 15:07

    Unfortunately, there is still no single video and audio codec, which is supported by all browsers! The programmers have to ensure that there is fallback provided for use-cases where browser A doesn't support codec B and vice versa.

    You can take a look at this compatibility table, for both desktop and mobile browsers.

    Desktop:

    • Internet Explorer (9.0+) support MP3 and AAC codecs
    • Chrome (6.0+) support Ogg Vorbis, MP3, WAV+
    • Firefox (3.6+) support Ogg Vorbis, WAV
    • Safari (5.0+) support MP3, AAC, WAV
    • Opera (10.0+) support Ogg Vorbis, WAV

    Mobile:

    • Opera Mobile (11.0+) supported codecs are device-dependent
    • Android (2.3+) supported codecs are device-dependent
    • Mobile Safari (iDevices with iOS 3.0+) support MP3, AAC
    • Blackberry (6.0+) support MP3, AAC

    Since flash is still widespread enough, it's probably the safest fallback.

    Also, I want to note that there's nothing worse to use some library, some of them (e.g. jPlayer) provides very powerful interface and this only can help you to produce better code!

    I think you can find everything you want to know in the following article: HTML5 Audio Radio Player by Opera Devs

提交回复
热议问题