We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
现在pcm数据全部播放一遍之后,就不能从头播放了,组件内部能否保存接收到的pcm数据,以便支持从头播放,就像 html 的 audio 标签那样
同时添加一个player.replay()的方法
player.replay()
The text was updated successfully, but these errors were encountered:
工具本身目标是流式播放,更像是打电话的那种场景。你需要重播的话,可以先自己把收到的音频数据存起来,然后按需再次进行播放。
<button onclick="replay()">重放</button>
// 伪代码 let box = [] ws.addEventListener('message', function (event) { // 拿到数据的时候,缓存一份 box.push(event.data) }); function replay(){ let count = 0 setInterval(()=>{ player.feed(box[count]); count++ },200) }
Sorry, something went wrong.
This issue was closed because it has been inactive for 14 days since being marked as stale.
No branches or pull requests
现在pcm数据全部播放一遍之后,就不能从头播放了,组件内部能否保存接收到的pcm数据,以便支持从头播放,就像 html 的 audio 标签那样
同时添加一个
player.replay()
的方法The text was updated successfully, but these errors were encountered: