Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

あるSoundを再生中にそのSoundのplay()を呼び出した時、DOMSoundとWebAudioSoundで挙動が異なる #236

Open
tSU-RooT opened this issue Dec 24, 2013 · 0 comments

Comments

@tSU-RooT
Copy link

あるSoundを再生中にそのSoundのplay()を呼び出した時、DOMSoundとWebAudioSoundで挙動が異なります。

具体的に言うとDOMSoundでは単にラッパーなので単に内部のplay()が呼び出され、すでに再生が終了していない限り何も起こりませんが
WebAudioSoundでは_currentTimeが巻き戻され、現在再生中のサウンドが中断され最初から再生されるようです。
わざと二重に再生する際はSoundのclone()を利用してから呼び出すなどの、適切な処理をしていればこのことが問題になることはありませんが、ブラウザ環境によって動作が異なることに気がついたので報告しておきます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant