Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

Mp3 file plays by URL, but fails to play in audio tag.

  • 3 ответа
  • 3 имеют эту проблему
  • 14 просмотров
  • Последний ответ от soumyadipDe

more options

This URL, when hit directly, it plays.

http://ezto-cf-media.mheducation.com/Media/Connect_Production/Externalized/Audio/13252700146307755.mp3

But when embedded in audio tag, it fails to play and firefox shows "Media resource http://ezto-cf-media.mheducation.com/Media/Connect_Production/Externalized/Audio/13252700146307755.mp3 could not be decoded. All candidate resources failed to load. Media load paused."

Audio tag is implemented as,

<audio class="audio-player" controls><source type="audio/mpeg" src="http://ezto-cf-media.mheducation.com/Media/Connect_Production/Externalized/Audio/13252700146307755.mp3"></source></audio>
This URL, when hit directly, it plays. http://ezto-cf-media.mheducation.com/Media/Connect_Production/Externalized/Audio/13252700146307755.mp3 But when embedded in audio tag, it fails to play and firefox shows "Media resource http://ezto-cf-media.mheducation.com/Media/Connect_Production/Externalized/Audio/13252700146307755.mp3 could not be decoded. All candidate resources failed to load. Media load paused." Audio tag is implemented as, <pre><nowiki><audio class="audio-player" controls><source type="audio/mpeg" src="http://ezto-cf-media.mheducation.com/Media/Connect_Production/Externalized/Audio/13252700146307755.mp3"></source></audio></nowiki></pre>

Изменено cor-el

Все ответы (3)

more options

HTML is used as below.

<audio class="audio-player" controls> <source type="audio/mpeg" src="http://ezto-cf-media.mheducation.com/Media/Connect_Production/Externalized/Audio/13252700146307755.mp3"></source></audio>

Изменено cor-el

more options

I'm not sure what kind of file this is because the Network Monitor shows it as type audio/x-wav when used with the audio tag. When the URL is loaded via the location bar then the Network Monitor shows audio/mpeg. The decoder used with the audio tag might not recognize the file correctly.

more options

The "Content-type" in response header shows "audio/mpeg". Can you please let me know where you are seeing "audio/x-wav". Attaching screenshot.

Thanks