【发布时间】:2015-02-13 21:41:28
【问题描述】:
我对 WordPress Audio Shortcode 有疑问。我是这样使用的:
<?php
echo do_shortcode('[audio mp3="http://whowillbethenextonline.com/audio/html5-audio-1.mp3" ogg="http://whowillbethenextonline.com/audio/html5-audio-1.ogg"]');
?>
但在前面,我得到了 HTML 代码:
<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
<audio class="wp-audio-shortcode" id="audio-362-1" preload="none" style="width: 100%; visibility: hidden;" controls="controls">
<source type="audio/mpeg" src="http://whowillbethenextonline.com/audio/html5-audio-1.mp3?_=1" />
<source type="audio/ogg" src="http://whowillbethenextonline.com/audio/html5-audio-1.ogg?_=1" />
<a href="http://whowillbethenextonline.com/audio/html5-audio-1.mp3">
http://whowillbethenextonline.com/audio/html5-audio-1.mp3
</a>
</audio>
如您所见,<source/> 标记中音频文件的 URL 不正确(在 <a/> 标记中,URL 正常)。它在 URL 的末尾有一些奇怪的“?_=1”,当然,播放器不起作用。浏览器无法识别多媒体文件。
你能帮帮我吗?你知道我该如何解决它吗?
问候
【问题讨论】:
标签: wordpress audio html5-audio shortcode