问题描述
我正在 Mac 上使用 Howler.js 和 Tumult Hype 为艺术项目制作一个带有音频的简单网络应用。
我使用以下来自 @janis-kra 的代码向前或向后滚动声音 - 效果很好。
现在我试图找到一种方法将当前播放的声音设置为一个变量,这样我就可以控制正在播放的任何声音。
有人可以建议吗?
const sound = this.howl.pause()._sounds[0];
const currentSeek = sound._seek;
const forwardTo = currentSeek + 30;
const duration = this.howl.duration();
if (forwardTo >= duration) {
return;
}
console.log('skipping to ' + forwardTo + ' from ' + currentSeek);
this.howl.seek(forwardTo);
this.howl.play();
}
_Originally posted by @janis-kra in https://github.com/goldfire/howler.js/issues/1197#issuecomment-535065460_
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)