简体   繁体   English

HTML5音频播放按钮在Internet Explorer中不起作用

[英]HTML5 Audio Play Button Does Not Work in Internet Explorer

I am currently unable to get the HTML5 audio player play button to work in order to play back an audio file within Internet Explorer. 我目前无法使HTML5音频播放器的播放按钮正常工作,以便在Internet Explorer中播放音频文件。

On page load, I have a number of rows present, each with audio players to play back a file. 在页面加载时,我有很多行,每个行都有音频播放器来播放文件。 All of these players work and play back the relevant file. 所有这些播放器都可以工作并播放相关文件。

On selecting an option on the page, javascript is used to change the page content. 在页面上选择一个选项时,将使用javascript来更改页面内容。 The layout is similar, but just one row is present (which happens to be the same as one of the rows previously). 布局相似,但仅存在一行(恰好与先前的其中一行相同)。 When trying to play back the audio now, the play button doesn't respond (not even changing to pause). 现在尝试播放音频时,播放按钮没有响应(甚至没有更改为暂停)。 Right clicking the player and selecting play works fine. 右键单击播放器,然后选择播放即可。

I've checked the DOM and the audio element seems to be OK: 我检查了DOM,音频元素似乎还可以:

<audio controls="controls" preload="none" id="audio-11591-2364252-1413560341" class="col-xs-12 col-sm-12 col-md-3">
<source src="audiostore.php?uid=11591&amp;file=2364252&amp;type=mp3" type="audio/mpeg">
</audio>

It all works fine in Chrome and Firefox. 在Chrome和Firefox中一切正常。

Any thoughts on why the play button may not be working or a way to work around this? 是否对播放按钮为何不起作用或解决方法有任何想法?

If the audio just doesn't play there is a fine chance that you are ignoring a pop-up at the bottom ".. is blocking ActiveX" with an "unblock" button. 如果音频没有播放,则很有可能您忽略了底部的弹出窗口,即“ ..正在阻止ActiveX”,并带有“取消阻止”按钮。 Click the "unblock" button and the ActiveX will be working now and the audio will play. 单击“取消阻止”按钮,ActiveX将立即开始工作并播放音频。 It worked for me perfectly. 它对我来说很完美。 For some reason I had to click it every time I open a new tab though 由于某种原因,每次打开新标签页时我都必须单击它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM