无缝循环音频HTML5 [英] gapless looping audio html5

查看:345
本文介绍了无缝循环音频HTML5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人有任何想法如何做到无缝循环用于音频的标签?我想基于JavaScript的东西..

anyone have any idea how to accomplish gapless looping for the audio tag? I'm thinking something javascript based..

我有一个循环说1措施,我希望它环路,并留在节奏。所以,我需要循环顺畅/无间隙。当我只需设置循环为真将滞后和不留节奏。

I have a loop say 1 measure and I want it to loop and stay in tempo. So I need the loop to be smooth/gapless. When i simply set "loop" to true it will lag and does not stay in tempo.

推荐答案

不幸的是,这是HTML5元素的弱点之一。谁也不能保证,当你希望它或不拖延音频将发挥。

Unfortunately this is one of the weaknesses of the HTML5 element. There is no guarantee that audio will play when you want it to or without delay.

有两种选择值得探讨 - SoundManager2(http://www.schillmania.com/projects/soundmanager2/)是一个伟大的图书馆这可能会有帮助在这里,虽然它会使用Flash在播放音频这种情况下。

There are two options worth looking into - SoundManager2 (http://www.schillmania.com/projects/soundmanager2/) is a great library that would probably be helpful here, though it'll use Flash to play the audio in this case.

另一种选择是看在Chrome网络音频API或Firefox中的音频数据API。两者都是真正的新,并没有真正准备好黄金时间未定,但允许你做这样的事情预定的音频播放,循环和一大堆更多。请查看 http://www.htmlfivewow.com/slide58 以一串更多信息!

The other option is to look at the Web Audio API in Chrome or the Audio Data API in Firefox. Both are really new, and not really ready for prime time yet, but allow you to do things like scheduled audio playback, looping and a whole lot more. Check out http://www.htmlfivewow.com/slide58 for a bunch more info!

这篇关于无缝循环音频HTML5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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