在ASP.NET中播放具有条件的音频剪辑 [英] Play audio clip with a condition in ASP.NET

查看:114
本文介绍了在ASP.NET中播放具有条件的音频剪辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这几天了,非常沮丧。



我的HTML5音频标签在我的页面上运行得很好。它播放音频。



但是,在该页面上,由于它自动更新,我想根据条件播放音频,只播放一次,除非播放它的条件会被重置。页面保留在浏览器上并且每隔几秒左右刷新一次。



不幸的是,我只能循环音频,或者让它播放一次,但是再也不会了。



任何例子都会受到赞赏。



谢谢!

解决方案

我认为您需要在音频标签中添加attributer -

 Controls 





<音频控制>

< source src =abc.mp3type =audio / mp3/>

< / audio> ;


I have been at this for several days now and am very frustrated.

I have the HTML5 audio tag working just fine on my page. It plays the audio.

On that page, though, as it updates itself, I want to play the audio based on a condition, and only play it once unless the condition that plays it gets reset. The page remains on the browser and is refreshed every few seconds or so.

Unfortunately, I am only able to either loop the audio, or get it to play once, but never again.

Any examples would be appreciated.

Thanks!

解决方案

I think You need to add attributer -

Controls

in your Audio tag

<audio controls>
<source src="abc.mp3" type="audio/mp3" />
</audio>


这篇关于在ASP.NET中播放具有条件的音频剪辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆